提出 #24617122


ソースコード 拡げる

Copy
Copy
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void) {
  5. double PI = atan(1) * 4;
  6. double T;
  7. double L, X, Y;
  8. int Q;
  9. int i;
  10. if (scanf("%lf", &T) != 1) return 1;
  11. if (scanf("%lf%lf%lf", &L, &X, &Y) != 3) return 1;
  12. if (scanf("%d", &Q) != 1) return 1;
  13. for (i = 0; i < Q; i++) {
  14. double E;
  15. double y, z;
  16. double teihen, takasa;
  17. if(scanf("%lf", &E) != 1) return 1;
  18. y = -(L / 2) * sin(2.0 * PI * E / T);
  19. z = (L / 2) - (L / 2) * cos(2.0 * PI * E / T);
  20. teihen = sqrt(X * X + (Y - y) * (Y - y));
  21. takasa = z;
  22. printf("%.15f\n", atan2(takasa, teihen) * 180.0 / PI);
  23. }
  24. return 0;
  25. }
#include <stdio.h>
#include <math.h>

int main(void) {
	double PI = atan(1) * 4;
	double T;
	double L, X, Y;
	int Q;
	int i;
	if (scanf("%lf", &T) != 1) return 1;
	if (scanf("%lf%lf%lf", &L, &X, &Y) != 3) return 1;
	if (scanf("%d", &Q) != 1) return 1;
	for (i = 0; i < Q; i++) {
		double E;
		double y, z;
		double teihen, takasa;
		if(scanf("%lf", &E) != 1) return 1;
		y = -(L / 2) * sin(2.0 * PI * E / T);
		z = (L / 2) - (L / 2) * cos(2.0 * PI * E / T);
		teihen = sqrt(X * X + (Y - y) * (Y - y));
		takasa = z;
		printf("%.15f\n", atan2(takasa, teihen) * 180.0 / PI);
	}
	return 0;
}

提出情報

提出日時
問題 018 - Statue of Chokudai(★3)
ユーザ mikecat
言語 C (GCC 9.2.1)
得点 3
コード長 614 Byte
結果 AC
実行時間 5 ms
メモリ 2684 KB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 3 / 3
結果
AC × 2
AC × 27
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt
All 00_sample_00.txt, 00_sample_01.txt, 10_random_small_00.txt, 10_random_small_01.txt, 10_random_small_02.txt, 10_random_small_03.txt, 10_random_small_04.txt, 10_random_small_05.txt, 10_random_small_06.txt, 10_random_small_07.txt, 10_random_small_08.txt, 10_random_small_09.txt, 11_random_large_00.txt, 11_random_large_01.txt, 11_random_large_02.txt, 11_random_large_03.txt, 11_random_large_04.txt, 11_random_large_05.txt, 11_random_large_06.txt, 11_random_large_07.txt, 11_random_large_08.txt, 11_random_large_09.txt, 20_random_max_00.txt, 20_random_max_01.txt, 20_random_max_02.txt, 20_random_max_03.txt, 20_random_max_04.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 5 ms 2564 KB
00_sample_01.txt AC 1 ms 2508 KB
10_random_small_00.txt AC 1 ms 2228 KB
10_random_small_01.txt AC 1 ms 2528 KB
10_random_small_02.txt AC 1 ms 2524 KB
10_random_small_03.txt AC 1 ms 2452 KB
10_random_small_04.txt AC 1 ms 2528 KB
10_random_small_05.txt AC 1 ms 2564 KB
10_random_small_06.txt AC 1 ms 2516 KB
10_random_small_07.txt AC 1 ms 2528 KB
10_random_small_08.txt AC 2 ms 2456 KB
10_random_small_09.txt AC 2 ms 2392 KB
11_random_large_00.txt AC 1 ms 2464 KB
11_random_large_01.txt AC 3 ms 2488 KB
11_random_large_02.txt AC 3 ms 2552 KB
11_random_large_03.txt AC 3 ms 2528 KB
11_random_large_04.txt AC 2 ms 2452 KB
11_random_large_05.txt AC 1 ms 2456 KB
11_random_large_06.txt AC 2 ms 2512 KB
11_random_large_07.txt AC 2 ms 2548 KB
11_random_large_08.txt AC 4 ms 2628 KB
11_random_large_09.txt AC 2 ms 2508 KB
20_random_max_00.txt AC 2 ms 2640 KB
20_random_max_01.txt AC 2 ms 2684 KB
20_random_max_02.txt AC 2 ms 2572 KB
20_random_max_03.txt AC 2 ms 2684 KB
20_random_max_04.txt AC 2 ms 2624 KB


2023-08-06 (日)
22:41:59 +00:00