結果

問題 No.231 めぐるはめぐる (1)
ユーザー ohreitetsuohreitetsu
提出日時 2018-05-27 12:06:28
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 442 bytes
コンパイル時間 567 ms
コンパイル使用メモリ 69,696 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-11 03:54:21
合計ジャッジ時間 3,036 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
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 AC 2 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
int main(int argc, char* argv[])
{
	int N;
	cin>>N;
	vector<int> G(N),D(N);
	int i;
	for (i=0;i<N;i++){
		cin>>G[i]>>D[i];
	}
	int n;
	int exp=0;
	i=0;
	for (n=1;n<=6;n++){
		exp+=G[i]-30000*D[i];
		i++;
		i%=N;
	}
	if (exp>=30000){
		cout<<"YES"<<endl;
		i=1;
		for (n=1;n<=6;n++){
			cout<<i<<endl;
			i++;
			if (i>N){
				i=1;
			}
		}
	}else{
		cout<<"NO"<<endl;
	}
	return 0;
}
0