結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
![]() |
提出日時 | 2017-07-11 19:25:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 388 bytes |
コンパイル時間 | 587 ms |
コンパイル使用メモリ | 68,552 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 06:35:58 |
合計ジャッジ時間 | 1,983 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 53 |
ソースコード
#include <iostream> #include <vector> using namespace std; #define rep(i,n) for(int i = 0; i < (n); i++) int main(){ int x; cin >> x; int y; cin >> y; int n; cin >> n; vector<int>a(n); rep(i,n){ cin >> a[i]; } bool flag = true; rep(i,n-1){ if(x * a[i + 1] < y * a[i])flag = false; } printf(flag ? "YES\n" : "NO\n"); return 0; }