結果
問題 | No.231 めぐるはめぐる (1) |
ユーザー |
![]() |
提出日時 | 2015-08-07 16:11:01 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 188 ms / 1,000 ms |
コード長 | 729 bytes |
コンパイル時間 | 3,386 ms |
コンパイル使用メモリ | 75,224 KB |
実行使用メモリ | 43,440 KB |
最終ジャッジ日時 | 2024-11-07 23:43:25 |
合計ジャッジ時間 | 6,002 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
ソースコード
import java.util.Scanner; public class No231 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); boolean cleable = false; int[] arrayG = new int[n]; //データ入力 for(int i = 0; i < n; i++){ int g = sc.nextInt(); int d = sc.nextInt(); //クリア可能かどうか判定 if((g - 30000 * d) >= 500000){ cleable = true; arrayG[i] = g - 30000 * d; } } sc.close(); //判定 if(!cleable){ System.out.println("NO"); }else{ System.out.println("YES"); for(int i = 0; i < n; i ++){ if(arrayG[i] < 500000){ continue; } for(int j = 0; j < 6; j++){ System.out.println(i + 1); } break; } } } }