結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
|
提出日時 | 2020-03-19 18:29:58 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 292 bytes |
コンパイル時間 | 1,929 ms |
コンパイル使用メモリ | 194,356 KB |
最終ジャッジ日時 | 2025-01-09 07:56:58 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 53 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); int x,y,n; cin>>x>>y>>n; vector<int>a(n); for(auto&i:a)cin>>i; bool yes=true; for(int i=1;i<n;++i){ if(x*a.at(i)<y*a.at(i-1))yes=false; } if(yes)cout<<"YES\n"s; else cout<<"NO\n"s; }