結果

問題 No.216 FAC
ユーザー TatsuDX
提出日時 2016-09-09 00:32:32
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 404 bytes
コンパイル時間 3,518 ms
コンパイル使用メモリ 74,368 KB
実行使用メモリ 55,852 KB
最終ジャッジ日時 2024-11-15 22:52:45
合計ジャッジ時間 7,464 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 15 WA * 9
権限があれば一括ダウンロードができます

ソースコード

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