結果

問題 No.231 めぐるはめぐる (1)
ユーザー shinwisteriashinwisteria
提出日時 2018-03-15 19:33:22
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 511 bytes
コンパイル時間 3,614 ms
コンパイル使用メモリ 75,140 KB
実行使用メモリ 56,956 KB
最終ジャッジ日時 2024-05-10 04:12:46
合計ジャッジ時間 10,559 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 200 ms
43,536 KB
testcase_01 AC 155 ms
41,852 KB
testcase_02 AC 147 ms
41,728 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 189 ms
42,612 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 131 ms
41,312 KB
testcase_10 AC 134 ms
41,400 KB
testcase_11 AC 127 ms
41,344 KB
testcase_12 AC 187 ms
46,452 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[n-1] * 6 >= 3000000){
			System.out.println("YES");
			for(int i = 0;i < 6;i++){
				System.out.println(max+1);
			}
		}else{
			System.out.println("NO");
		}

	}

}
0