結果
| 問題 |
No.231 めぐるはめぐる (1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-06-26 02:55:38 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 197 ms / 1,000 ms |
| コード長 | 800 bytes |
| コンパイル時間 | 4,243 ms |
| コンパイル使用メモリ | 74,484 KB |
| 実行使用メモリ | 43,164 KB |
| 最終ジャッジ日時 | 2024-11-07 23:29:33 |
| 合計ジャッジ時間 | 7,464 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
ソースコード
import java.util.Scanner;
public class Yukicoder231 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int[] gain = new int[N];
int maxIndex = 0;
int max = 0;
for (int i = 0; i < N; i++) {
int G = scanner.nextInt();
int D = scanner.nextInt();
gain[i] = G - 30000 * D;
if (max < gain[i]) {
max = gain[i];
maxIndex = i;
}
}
if (3000000 > gain[maxIndex] * 6) {
System.out.println("NO");
} else {
System.out.println("YES");
for (int i = 0; i < 6; i++) {
System.out.println(maxIndex + 1);
}
}
}
}