結果

問題 No.231 めぐるはめぐる (1)
ユーザー mits58mits58
提出日時 2016-07-02 18:06:04
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 660 bytes
コンパイル時間 7,126 ms
コンパイル使用メモリ 75,492 KB
実行使用メモリ 56,756 KB
最終ジャッジ日時 2024-04-20 06:04:39
合計ジャッジ時間 5,573 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 148 ms
53,972 KB
testcase_02 AC 123 ms
53,912 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 160 ms
54,364 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 108 ms
54,292 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;

public class Main{
	static class dungeon implements Comparable<dungeon>{
		int g,d;
		public dungeon(int x,int y){
			this.g=x; this.d=y;
		}
		public int compareTo(dungeon o) {
			return (o.g-o.d*30000)-(this.g-this.d*30000);
		}
	}
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			int n=sc.nextInt();
			dungeon[] dg=new dungeon[n];
			for(int i=0;i<n;i++) dg[i]=new dungeon(sc.nextInt(),sc.nextInt());
			Arrays.sort(dg);
			if((dg[0].g-dg[0].d*30000)*6>=3000000) for(int i=0;i<6;i++) System.out.println(1);
			else System.out.println("NO");
		}
	}
}
0