結果

問題 No.231 めぐるはめぐる (1)
ユーザー masa
提出日時 2015-06-28 13:23:10
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 629 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 59,256 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 23:36:59
合計ジャッジ時間 1,281 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>

using namespace std;
const int penalty = 30000;
const int need = 100 * penalty;

int main() {
	int n, g, d;
	int efficient, max_efficient = 0;
	int which = -1;

	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> g >> d;

		efficient = g - d * penalty;
		if (efficient > max_efficient) {
			max_efficient = efficient;
			which = i + 1;
		}
	}

	if (max_efficient * 6 < need) {
		cout << "NO" << endl;
	} else {
		cout << "YES" << endl;
		for (int i = 0; i < 6; i++) {
			cout << which << endl;
		}
	}

	return 0;
}
0