結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
Yut176
|
| 提出日時 | 2017-06-10 16:41:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 584 bytes |
| コンパイル時間 | 697 ms |
| コンパイル使用メモリ | 85,228 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-27 06:34:15 |
| 合計ジャッジ時間 | 2,028 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 WA * 16 |
ソースコード
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
using namespace std;
int main(void) {
int x, y, n;
cin >> x >> y >> n;
vector<double> a(n);
for(int i=0; i<n; i++){
cin >> a[i];
}
double z = y / x;
for(int i=0; i<n-1; i++){
// cerr << a[i+1] << " " << a[i]*z << endl;
if( a[i+1] < a[i]*z ){
cout << "NO" << endl;
return 0;
}
}
cout << "YES" << endl;
return 0;
}
// EOF
Yut176