結果

問題 No.231 めぐるはめぐる (1)
ユーザー kiyunetsubamnakiyunetsubamna
提出日時 2015-06-27 00:48:13
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 651 bytes
コンパイル時間 382 ms
コンパイル使用メモリ 52,064 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-22 02:56:51
合計ジャッジ時間 1,801 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main(){
	int n;
	int g[100000];
	int d[100];
	int t[1000];
	int a[1000] = {0};
	int cnt = 0;
	int flag = 0;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> g[i];
		cin >> d[i];
	}
	for (int i = 0; i < n; i++){
		t[i] = g[i] - 30000*d[i];
		if (t[i] * 6 >= 3000000){
			a[i] = 1;
			if (flag == 0){
				cout << "YES" << endl;
				flag = 1;
			}
		}
	}
	if (flag == 0){
		cout << "NO" << endl;
		cnt = 6;
	}
	while (cnt < 6){
		for (int i1 = 0; i1 < n; i1++){
			if (a[i1] == 1){
				cnt += 1;
				cout << i1 + 1 << endl;
				if (cnt == 6){
					break;
				}
			}
		}
	}




	return 0;
}
0