結果
問題 | No.512 魔法少女の追いかけっこ |
ユーザー | nukacha |
提出日時 | 2017-05-05 23:35:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 422 bytes |
コンパイル時間 | 639 ms |
コンパイル使用メモリ | 69,376 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 06:16:46 |
合計ジャッジ時間 | 2,030 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 53 |
ソースコード
#include <iostream> #include <vector> int main() { int x, y; int n; std::vector<int> a; std::cin >> x >> y; std::cin >> n; a.resize(n); for (int i = 0; i < n; i++) { std::cin >> a[i]; } for (int i = 0; i < n - 1; i++) { if (y * a[i] > x * a[i+1]) { std::cout << "NO" << std::endl; return 0; } } std::cout << "YES" << std::endl; }