結果
問題 | No.512 魔法少女の追いかけっこ |
ユーザー |
![]() |
提出日時 | 2017-05-05 22:50:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 726 bytes |
コンパイル時間 | 795 ms |
コンパイル使用メモリ | 88,176 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 06:05:36 |
合計ジャッジ時間 | 2,154 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 53 |
ソースコード
#include <algorithm>#include <cstdio>#include <iostream>#include <map>#include <cmath>#include <queue>#include <set>#include <sstream>#include <stack>#include <string>#include <vector>#include <stdlib.h>#include <stdio.h>#include <bitset>using namespace std;#define ll long long#define PI acos(-1.0)#define FOR(I,A,B) for(int I = (A); I < (B); ++I)int main(){double X, Y;cin >> X >> Y;int N;cin >> N;double A[N];FOR(i,0,N) scanf("%lf",A+i);bool check = true;FOR(i,0,N-1){if(A[i]*Y>A[i+1]*X){cout << "NO" << endl;check = false;break;}}if(check) cout << "YES" << endl;return 0;}