結果

問題 No.231 めぐるはめぐる (1)
ユーザー GrenacheGrenache
提出日時 2015-06-26 23:00:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 192 ms / 1,000 ms
コード長 860 bytes
コンパイル時間 3,082 ms
コンパイル使用メモリ 74,928 KB
実行使用メモリ 43,164 KB
最終ジャッジ日時 2024-04-25 12:08:42
合計ジャッジ時間 5,958 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 192 ms
43,164 KB
testcase_01 AC 140 ms
41,400 KB
testcase_02 AC 137 ms
41,336 KB
testcase_03 AC 171 ms
42,552 KB
testcase_04 AC 181 ms
42,916 KB
testcase_05 AC 164 ms
42,104 KB
testcase_06 AC 181 ms
42,836 KB
testcase_07 AC 153 ms
41,648 KB
testcase_08 AC 160 ms
42,212 KB
testcase_09 AC 122 ms
41,100 KB
testcase_10 AC 112 ms
39,716 KB
testcase_11 AC 118 ms
40,116 KB
testcase_12 AC 181 ms
42,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder231 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] g = new int[n];
        int[] d = new int[n];
        int[] e = new int[n];
        for (int i = 0; i < n; i++) {
        	g[i] = sc.nextInt();
        	d[i] = sc.nextInt();
        	
        	e[i] = g[i] - 30000 * d[i];
        }

        int max = 0;
        int maxi = 0;
        for (int i = 0; i < n; i++) {
        	if (e[i] > max) {
        		max = e[i];
        		maxi = i + 1;
        	}
        }

        if (max * 6 >= 3000000) {
        	System.out.println("YES");
        	for (int i = 0; i < 6; i++) {
        		System.out.println(maxi);
        	}
        } else {
        	System.out.println("NO");
        }
        
        sc.close();
    }
}
0