結果

問題 No.231 めぐるはめぐる (1)
ユーザー 37zigen37zigen
提出日時 2016-03-30 13:23:25
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 535 bytes
コンパイル時間 2,025 ms
コンパイル使用メモリ 74,228 KB
実行使用メモリ 56,760 KB
最終ジャッジ日時 2024-04-10 02:00:19
合計ジャッジ時間 5,704 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 195 ms
56,712 KB
testcase_01 AC 152 ms
54,288 KB
testcase_02 AC 143 ms
54,244 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 184 ms
54,488 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 129 ms
54,292 KB
testcase_10 AC 130 ms
54,320 KB
testcase_11 AC 120 ms
53,600 KB
testcase_12 AC 188 ms
54,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder231;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		long[] g=new long[n];
		long[] d=new long[n];
		long max=-999999;
		long maxi=-1;
		for(int i=0;i<n;i++){
			g[i]=sc.nextInt();
			d[i]=sc.nextInt();
			max=Math.max(g[i]-30000*d[i], max);
			maxi=i;
		}
		if(6*max>=3000000){
			System.out.println("YES");
			for(int i=0;i<6;i++)
				System.out.println(maxi+1);
		}else{
			System.out.println("NO");
		}
		
		
	}
}
0