結果

問題 No.216 FAC
ユーザー TatsuDXTatsuDX
提出日時 2016-09-09 00:32:32
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 404 bytes
コンパイル時間 3,476 ms
コンパイル使用メモリ 75,044 KB
実行使用メモリ 54,496 KB
最終ジャッジ日時 2024-04-27 18:21:16
合計ジャッジ時間 7,546 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
54,116 KB
testcase_01 WA -
testcase_02 AC 126 ms
53,644 KB
testcase_03 AC 143 ms
53,788 KB
testcase_04 AC 138 ms
53,896 KB
testcase_05 AC 139 ms
53,976 KB
testcase_06 AC 114 ms
53,908 KB
testcase_07 AC 126 ms
53,712 KB
testcase_08 AC 110 ms
53,332 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 130 ms
54,004 KB
testcase_14 WA -
testcase_15 AC 122 ms
53,764 KB
testcase_16 AC 145 ms
54,172 KB
testcase_17 AC 147 ms
53,900 KB
testcase_18 WA -
testcase_19 AC 129 ms
53,996 KB
testcase_20 WA -
testcase_21 AC 138 ms
54,044 KB
testcase_22 AC 142 ms
54,176 KB
testcase_23 AC 140 ms
54,232 KB
testcase_24 WA -
testcase_25 AC 134 ms
54,104 KB
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt(), tmp;
		int[] m = new int[101];
		for(int i = 0; i < n; i++){
			tmp = sc.nextInt();
			m[sc.nextInt()] += tmp;
		}
		for(int i = 1; i < 101; i++){
			if(m[0] < m[i]){
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	}
}
0