結果

問題 No.512 魔法少女の追いかけっこ
ユーザー aaa
提出日時 2018-10-18 14:01:56
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,133 bytes
コンパイル時間 875 ms
コンパイル使用メモリ 97,888 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 20:14:14
合計ジャッジ時間 2,762 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h> 
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>
#include <ctype.h>
#include <set>
#include <sstream>

using namespace std;



int main() {
	int i, j, k;
	double x, y, n;
	vector<double>a;

	cin >> x >> y >> n;

	for (i = 0; i < n; i++) {
		double num;
		cin >> num;
		a.push_back(num);
	}

	double koba = x * 1000 / 3600.0;
	double si = y * 1000 / 3600.0;

	double sk = 0, ss = 0;
	vector<double>klist;
	vector<double>slist;
	//double sum = 0;

	for (i = 0; i < n; i++) {
		klist.push_back(a[i] / koba);
		slist.push_back(a[i] / si);
	}

	bool flag = false;

	for (i = 0; i < n - 1; i++) {
		//cout << "klist->" <<fixed <<setprecision(19) << klist[i] << " " << "slist->" << slist[i + 1] << endl;
		if (klist[i] > slist[i + 1] + 0.000001) {
			flag = true;
			break;
		}
	}

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



	




	getchar();
	getchar();
	return 0;
}
0