結果

問題 No.231 めぐるはめぐる (1)
ユーザー 37zigen37zigen
提出日時 2016-03-30 13:19:26
言語 Java21
(openjdk 21)
結果
WA  
(最新)
J_TLE  
(最初)
実行時間 -
コード長 529 bytes
コンパイル時間 2,177 ms
コンパイル使用メモリ 74,288 KB
実行使用メモリ 56,792 KB
最終ジャッジ日時 2024-04-10 01:59:50
合計ジャッジ時間 5,561 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 182 ms
56,792 KB
testcase_01 AC 157 ms
54,060 KB
testcase_02 AC 134 ms
54,008 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 184 ms
54,276 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 108 ms
53,032 KB
testcase_10 AC 121 ms
54,080 KB
testcase_11 AC 107 ms
52,900 KB
testcase_12 AC 170 ms
54,368 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();
		int[] g=new int[n];
		int[] d=new int[n];
		int max=-999999;
		int 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