結果

問題 No.231 めぐるはめぐる (1)
ユーザー shinwisteriashinwisteria
提出日時 2018-03-15 19:34:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 198 ms / 1,000 ms
コード長 511 bytes
コンパイル時間 4,634 ms
コンパイル使用メモリ 72,396 KB
実行使用メモリ 58,832 KB
最終ジャッジ日時 2023-08-22 22:57:03
合計ジャッジ時間 8,390 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 193 ms
58,680 KB
testcase_01 AC 155 ms
55,740 KB
testcase_02 AC 143 ms
55,488 KB
testcase_03 AC 182 ms
57,956 KB
testcase_04 AC 198 ms
58,832 KB
testcase_05 AC 184 ms
56,464 KB
testcase_06 AC 194 ms
58,344 KB
testcase_07 AC 155 ms
55,712 KB
testcase_08 AC 188 ms
56,692 KB
testcase_09 AC 126 ms
55,368 KB
testcase_10 AC 125 ms
55,512 KB
testcase_11 AC 125 ms
55,344 KB
testcase_12 AC 191 ms
56,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con231 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt() , max = 0;
		int[] gd = new int[n];
		for(int i = 0;i < n;i++){
			gd[i] = s.nextInt() - 30000 * s.nextInt();
			if(gd[max] < gd[i]){
				max = i;
			}
		}
		s.close();

		if(gd[max] * 6 >= 3000000){
			System.out.println("YES");
			for(int i = 0;i < 6;i++){
				System.out.println(max+1);
			}
		}else{
			System.out.println("NO");
		}

	}

}
0