結果

問題 No.231 めぐるはめぐる (1)
ユーザー ぴろずぴろず
提出日時 2015-06-26 22:24:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 194 ms / 1,000 ms
コード長 555 bytes
コンパイル時間 1,976 ms
コンパイル使用メモリ 71,832 KB
実行使用メモリ 58,160 KB
最終ジャッジ日時 2023-08-07 18:33:16
合計ジャッジ時間 5,242 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 194 ms
58,052 KB
testcase_01 AC 150 ms
55,536 KB
testcase_02 AC 140 ms
55,688 KB
testcase_03 AC 190 ms
58,160 KB
testcase_04 AC 191 ms
58,120 KB
testcase_05 AC 170 ms
55,924 KB
testcase_06 AC 188 ms
58,148 KB
testcase_07 AC 157 ms
55,844 KB
testcase_08 AC 182 ms
56,204 KB
testcase_09 AC 126 ms
55,420 KB
testcase_10 AC 122 ms
55,924 KB
testcase_11 AC 122 ms
55,472 KB
testcase_12 AC 180 ms
55,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no231;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int max = Integer.MIN_VALUE;
		int maxi = -1;
		for(int i=0;i<n;i++) {
			int g = sc.nextInt();
			int d = sc.nextInt();
			int exp = (g - 30000 * d) * 6;
			if (max < exp) {
				max = exp;
				maxi = i;
			}
		}
		if (max >= 30000 * 100) {
			System.out.println("YES");
			for(int i=0;i<6;i++) {
				System.out.println(maxi + 1);
			}
		}else{
			System.out.println("NO");
		}
	}

}
0