結果
問題 | No.512 魔法少女の追いかけっこ |
ユーザー | Nasatame |
提出日時 | 2017-04-08 07:58:20 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 638 bytes |
コンパイル時間 | 384 ms |
コンパイル使用メモリ | 56,324 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-27 05:42:54 |
合計ジャッジ時間 | 1,633 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 53 |
ソースコード
#include <iostream> #include <string> #include <assert.h> using namespace std; int a[100]; int main(void){ int x,y,n; cin >> x >> y >> n; assert(x >= 1 && x <= 100); assert(y >= 1 && y <= 100); assert(n >= 1 && n <= 80); for(int i = 0; i < n; i++) cin >> a[i]; bool f = true; for(int i = 0; i < n-1; i++){ assert(a[i] < a[i+1]); assert(0 < a[i] && a[i] <= 100000); if((a[i+1]) * x < ( a[i] * y ) ){ f = false; } } if(f) cout << "YES" << endl; else cout << "NO" << endl; }