結果

問題 No.231 めぐるはめぐる (1)
ユーザー YamaKasaYamaKasa
提出日時 2018-05-18 16:55:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 195 ms / 1,000 ms
コード長 629 bytes
コンパイル時間 2,166 ms
コンパイル使用メモリ 72,388 KB
実行使用メモリ 58,848 KB
最終ジャッジ日時 2023-09-10 22:53:59
合計ジャッジ時間 5,675 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 192 ms
58,848 KB
testcase_01 AC 156 ms
55,980 KB
testcase_02 AC 141 ms
56,300 KB
testcase_03 AC 189 ms
57,988 KB
testcase_04 AC 195 ms
58,380 KB
testcase_05 AC 185 ms
55,852 KB
testcase_06 AC 188 ms
57,940 KB
testcase_07 AC 153 ms
55,976 KB
testcase_08 AC 187 ms
56,108 KB
testcase_09 AC 126 ms
55,908 KB
testcase_10 AC 127 ms
55,464 KB
testcase_11 AC 126 ms
55,504 KB
testcase_12 AC 188 ms
56,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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