結果

問題 No.231 めぐるはめぐる (1)
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 08:32:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 201 ms / 1,000 ms
コード長 774 bytes
コンパイル時間 2,222 ms
コンパイル使用メモリ 72,692 KB
実行使用メモリ 58,944 KB
最終ジャッジ日時 2023-08-17 04:17:38
合計ジャッジ時間 5,795 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 198 ms
58,944 KB
testcase_01 AC 162 ms
54,012 KB
testcase_02 AC 140 ms
55,652 KB
testcase_03 AC 201 ms
58,296 KB
testcase_04 AC 196 ms
58,476 KB
testcase_05 AC 169 ms
54,292 KB
testcase_06 AC 187 ms
58,264 KB
testcase_07 AC 154 ms
56,248 KB
testcase_08 AC 180 ms
56,028 KB
testcase_09 AC 122 ms
55,820 KB
testcase_10 AC 122 ms
55,504 KB
testcase_11 AC 122 ms
55,924 KB
testcase_12 AC 174 ms
56,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int [] M = new int [N];
        int max = 0;
        
        for(int i=0; i<N; i++){
            int G = sc.nextInt();
            int D = sc.nextInt();
            M[i] = G-D*30000;
            max=Math.max(max,M[i]);
        }
        if(max*6>=30000*100){
            System.out.println("YES");
            int a=0;
            for(int i=0; i<N; i++){
                if(max==M[i]){
                    a=i+1;
                }
            }
            for(int i=0; i<6; i++){
                System.out.println(a);
            }
        }else{
            System.out.println("NO");
        }
    }
}
0