結果
| 問題 | No.512 魔法少女の追いかけっこ |
| コンテスト | |
| ユーザー |
taba
|
| 提出日時 | 2017-05-17 22:37:28 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 423 bytes |
| 記録 | |
| コンパイル時間 | 259 ms |
| コンパイル使用メモリ | 63,104 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-06 16:44:12 |
| 合計ジャッジ時間 | 1,634 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 53 |
ソースコード
#include <cstdio>
#include <vector>
using namespace std;
int main(){
int x,y,n;
scanf("%d%d%d",&x,&y,&n);
vector<double> a(n);
for(int i=0;i<n;i++)
scanf("%lf",&a[i]);
bool tf=true;
for(int i=0;i<n-1;i++){
double time=a[i]/x;
float ypos=y*time;
//printf("time=%lf pos=%lf next=%lf test=%d\n",time,ypos,a[i+1],ypos>a[i+1]);
if(ypos>a[i+1]){
tf=false;
break;
}
}
puts(tf?"YES":"NO");
return 0;
}
taba