結果
問題 | No.231 めぐるはめぐる (1) |
ユーザー |
|
提出日時 | 2018-03-15 19:33:22 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 511 bytes |
コンパイル時間 | 3,330 ms |
コンパイル使用メモリ | 74,468 KB |
実行使用メモリ | 56,920 KB |
最終ジャッジ日時 | 2024-12-18 01:16:33 |
合計ジャッジ時間 | 7,617 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 6 WA * 5 |
ソースコード
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"); } } }