結果

問題 No.512 魔法少女の追いかけっこ
ユーザー Yasufu12
提出日時 2017-05-05 22:35:38
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 53,984 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-27 05:58:06
合計ジャッジ時間 1,612 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

int x, y, n, a[80];
bool flag = true;

int main(){
	cin >> x >> y >> n;
	for (int i = 0; i < n; i++){
		cin >> a[i];
	}

	for (int i = 1; i < n; i++){
		if (a[i] * x < a[i - 1] * y){
			flag = false;
		}
	}

	if (flag){
		cout << "YES" << endl;
	}
	else{
		cout << "NO" << endl;
	}

	return 0;
}
0