結果

問題 No.231 めぐるはめぐる (1)
ユーザー tsunabittsunabit
提出日時 2019-05-23 23:27:30
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 845 bytes
コンパイル時間 3,539 ms
コンパイル使用メモリ 75,212 KB
実行使用メモリ 60,188 KB
最終ジャッジ日時 2023-10-17 11:40:10
合計ジャッジ時間 7,318 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 162 ms
57,448 KB
testcase_02 AC 151 ms
57,648 KB
testcase_03 AC 196 ms
57,664 KB
testcase_04 AC 195 ms
60,188 KB
testcase_05 AC 187 ms
57,760 KB
testcase_06 AC 193 ms
58,168 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 128 ms
57,200 KB
testcase_11 AC 128 ms
57,528 KB
testcase_12 AC 187 ms
57,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Scanner;
import java.util.Collections;

public class No231 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        
        int max = 0;
        int dan = 0;
        // 𝐺𝑖−30000𝐷𝑖 
        for(int i = 0; i < n; i++) {
        	int g = s.nextInt();
        	int d = s.nextInt();
        	int temp = g - 30000 * d;
        	if(max < temp) {
        		max = temp;
        		dan = i + 1;
        	}
        }
        if(max * 6 > 3000000) {
        	System.out.println("YES");
        	for(int i = 0; i < 6; i++) {
        		System.out.println(dan);
        	}
        }else {
        	System.out.println("NO");
        }
    }
}
0