結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
![]() |
提出日時 | 2018-10-04 13:30:57 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 615 bytes |
コンパイル時間 | 172 ms |
コンパイル使用メモリ | 31,104 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 12:11:57 |
合計ジャッジ時間 | 1,543 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 52 WA * 1 |
ソースコード
#include <stdio.h> #include <math.h> int main(void){ double X,Y; // Va,Vb [km/h] int N; // number of intersection int A[80]; // length of each intersection int i; // subscript double t; // time A arrive at A[i] scanf("%lf %lf %d",&X,&Y,&N); for(i = 0; i < N; i++){ scanf("%d",&A[i]); } // km/h -> m/s X /= 3.6; Y /= 3.6; for(i = 0; i < N - 1; i++){ t = (double)A[i] / X; if(floor(Y * t) > A[i+1]){ printf("NO\n"); return 0; } } printf("YES\n"); return 0; }