結果

問題 No.512 魔法少女の追いかけっこ
ユーザー GB
提出日時 2018-11-05 00:08:27
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 559 bytes
コンパイル時間 813 ms
コンパイル使用メモリ 65,776 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-20 20:08:38
合計ジャッジ時間 2,507 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 47 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<math.h>

using namespace std;

int main() {

	int x, y, n;
	cin >> x >> y;
	cin >> n;
	vector<int> kousaten;
	for (int i = 0;i < n;i++) {
		int buf=0;
		cin >> buf;
		kousaten.push_back(buf);
	}
	double xs = x * pow(10, 3) / pow(60, 2);
	double ys = y * pow(10, 3) / pow(60, 2);

	int j = 0;
	while (j <= n - 2) {
		double koba_now_s = kousaten[j] / xs;
		double master_p = koba_now_s * ys;
		if (master_p>kousaten[j + 1]) {
			cout << "NO" << endl;
			return 0;
		}
		j++;
	}
	cout << "YES" << endl;

	return 0;
}
0