結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
![]() |
提出日時 | 2018-10-04 13:26:54 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 590 bytes |
コンパイル時間 | 100 ms |
コンパイル使用メモリ | 29,440 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-12 12:11:48 |
合計ジャッジ時間 | 1,658 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 47 WA * 6 |
ソースコード
#include <stdio.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(Y * t > A[i+1]){ printf("NO\n"); return 0; } } printf("YES\n"); return 0; }