結果
| 問題 | 
                            No.231 めぐるはめぐる (1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-03-15 19:34:33 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 193 ms / 1,000 ms | 
| コード長 | 511 bytes | 
| コンパイル時間 | 3,737 ms | 
| コンパイル使用メモリ | 74,512 KB | 
| 実行使用メモリ | 55,340 KB | 
| 最終ジャッジ日時 | 2024-12-18 01:40:26 | 
| 合計ジャッジ時間 | 6,264 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 11 | 
ソースコード
package m.shin;
import java.util.Scanner;
public class Con231 {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt() , max = 0;
		int[] gd = new int[n];
		for(int i = 0;i < n;i++){
			gd[i] = s.nextInt() - 30000 * s.nextInt();
			if(gd[max] < gd[i]){
				max = i;
			}
		}
		s.close();
		if(gd[max] * 6 >= 3000000){
			System.out.println("YES");
			for(int i = 0;i < 6;i++){
				System.out.println(max+1);
			}
		}else{
			System.out.println("NO");
		}
	}
}