結果

問題 No.231 めぐるはめぐる (1)
ユーザー 37zigen37zigen
提出日時 2016-03-30 13:25:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 203 ms / 1,000 ms
コード長 566 bytes
コンパイル時間 2,103 ms
コンパイル使用メモリ 75,424 KB
実行使用メモリ 43,632 KB
最終ジャッジ日時 2024-04-25 12:44:35
合計ジャッジ時間 5,327 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 203 ms
43,336 KB
testcase_01 AC 161 ms
41,480 KB
testcase_02 AC 161 ms
41,204 KB
testcase_03 AC 187 ms
42,532 KB
testcase_04 AC 198 ms
43,632 KB
testcase_05 AC 178 ms
42,272 KB
testcase_06 AC 198 ms
42,688 KB
testcase_07 AC 170 ms
41,596 KB
testcase_08 AC 185 ms
42,112 KB
testcase_09 AC 131 ms
41,108 KB
testcase_10 AC 136 ms
41,260 KB
testcase_11 AC 133 ms
41,084 KB
testcase_12 AC 193 ms
42,488 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();
			if(g[i]-30000*d[i]>max){
				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