結果
| 問題 |
No.231 めぐるはめぐる (1)
|
| コンテスト | |
| ユーザー |
ぴろず
|
| 提出日時 | 2015-06-26 22:24:32 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 198 ms / 1,000 ms |
| コード長 | 555 bytes |
| コンパイル時間 | 3,418 ms |
| コンパイル使用メモリ | 74,024 KB |
| 実行使用メモリ | 43,372 KB |
| 最終ジャッジ日時 | 2024-11-07 23:29:40 |
| 合計ジャッジ時間 | 5,230 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
ソースコード
package no231;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int max = Integer.MIN_VALUE;
int maxi = -1;
for(int i=0;i<n;i++) {
int g = sc.nextInt();
int d = sc.nextInt();
int exp = (g - 30000 * d) * 6;
if (max < exp) {
max = exp;
maxi = i;
}
}
if (max >= 30000 * 100) {
System.out.println("YES");
for(int i=0;i<6;i++) {
System.out.println(maxi + 1);
}
}else{
System.out.println("NO");
}
}
}
ぴろず