結果

問題 No.231 めぐるはめぐる (1)
ユーザー IchimiyaIchimiya
提出日時 2020-07-27 04:21:23
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 496 bytes
コンパイル時間 1,562 ms
コンパイル使用メモリ 166,812 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-11 05:38:35
合計ジャッジ時間 4,033 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
const int64_t MOD = 1e9 + 7;

int main() {
	int N;
	cin >> N;

	const int score = 3000000;
	int a = score / N;
	vector<int> v(N);

	int f = 0, n = 0;
	for (int i = 0; i < N; i++) {
		int G, D;
		cin >> G >> D;
		v.at(i) = G - 30000 * D;

		if (v.at(i) >= a) {
			f = 1;
			n = i + 1;
		}
	}

	if (!f) {
		cout << "NO" << endl;
	}
	else {
		cout << "YES" << endl;
		for (int i = 0; i < 6; i++) {
			cout << n << endl;
		}
	}
}
0