結果

問題 No.231 めぐるはめぐる (1)
ユーザー 練習生練習生
提出日時 2015-08-07 16:11:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 202 ms / 1,000 ms
コード長 729 bytes
コンパイル時間 3,706 ms
コンパイル使用メモリ 75,120 KB
実行使用メモリ 43,548 KB
最終ジャッジ日時 2024-04-25 12:17:36
合計ジャッジ時間 6,824 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 199 ms
43,548 KB
testcase_01 AC 156 ms
41,500 KB
testcase_02 AC 144 ms
41,656 KB
testcase_03 AC 192 ms
43,008 KB
testcase_04 AC 202 ms
43,412 KB
testcase_05 AC 192 ms
41,832 KB
testcase_06 AC 194 ms
42,468 KB
testcase_07 AC 162 ms
41,404 KB
testcase_08 AC 192 ms
42,364 KB
testcase_09 AC 121 ms
39,984 KB
testcase_10 AC 131 ms
41,316 KB
testcase_11 AC 130 ms
40,964 KB
testcase_12 AC 194 ms
42,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No231 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean cleable = false;
		int[] arrayG = new int[n];
		//データ入力
		for(int i = 0; i < n; i++){
			int g = sc.nextInt();
			int d = sc.nextInt();
			//クリア可能かどうか判定
			if((g - 30000 * d) >= 500000){
				cleable = true;
				arrayG[i] = g - 30000 * d;
			}
		}
		sc.close();
		//判定
		if(!cleable){
			System.out.println("NO");
		}else{
			System.out.println("YES");			
			for(int i = 0; i < n; i ++){
				if(arrayG[i] < 500000){
					continue;
				}
				for(int j = 0; j < 6; j++){
					System.out.println(i + 1);	
				}
				break;
			}
		}
	}
}
0