結果
| 問題 | No.231 めぐるはめぐる (1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-06-26 23:00:56 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 114 ms / 1,000 ms |
| コード長 | 860 bytes |
| 記録 | |
| コンパイル時間 | 2,416 ms |
| コンパイル使用メモリ | 82,704 KB |
| 実行使用メモリ | 46,220 KB |
| 最終ジャッジ日時 | 2026-05-08 06:57:55 |
| 合計ジャッジ時間 | 4,732 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
ソースコード
import java.util.Scanner;
public class Main_yukicoder231 {
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[] e = new int[n];
for (int i = 0; i < n; i++) {
g[i] = sc.nextInt();
d[i] = sc.nextInt();
e[i] = g[i] - 30000 * d[i];
}
int max = 0;
int maxi = 0;
for (int i = 0; i < n; i++) {
if (e[i] > max) {
max = e[i];
maxi = i + 1;
}
}
if (max * 6 >= 3000000) {
System.out.println("YES");
for (int i = 0; i < 6; i++) {
System.out.println(maxi);
}
} else {
System.out.println("NO");
}
sc.close();
}
}