結果
問題 |
No.231 めぐるはめぐる (1)
|
ユーザー |
![]() |
提出日時 | 2016-01-04 08:36:13 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 81 ms / 1,000 ms |
コード長 | 742 bytes |
コンパイル時間 | 1,983 ms |
コンパイル使用メモリ | 74,364 KB |
実行使用メモリ | 38,060 KB |
最終ジャッジ日時 | 2024-11-08 00:09:35 |
合計ジャッジ時間 | 3,491 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
ソースコード
import java.io.*; import java.util.*; import java.math.*; class Main { public static void out (Object o) { System.out.println(o); } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int maxExp = -1 , maxId = -1; for (int i = 0; i < n; i++) { String[] line = br.readLine().split(" "); int g = Integer.parseInt(line[0]); int d = Integer.parseInt(line[1]); int exp = g - d * 30000; if (exp > maxExp) { maxExp = exp; maxId = i + 1; } } if (maxExp * 6 >= 3000000) { out("YES"); for (int i = 0; i < 6; i++) out(maxId); } else { out("NO"); } } }