結果

問題 No.216 FAC
ユーザー TatsuDXTatsuDX
提出日時 2016-09-09 00:35:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 162 ms / 1,000 ms
コード長 464 bytes
コンパイル時間 3,444 ms
コンパイル使用メモリ 75,508 KB
実行使用メモリ 54,428 KB
最終ジャッジ日時 2024-04-27 18:21:26
合計ジャッジ時間 8,365 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
53,896 KB
testcase_01 AC 135 ms
54,276 KB
testcase_02 AC 133 ms
54,172 KB
testcase_03 AC 153 ms
54,428 KB
testcase_04 AC 151 ms
54,116 KB
testcase_05 AC 144 ms
54,032 KB
testcase_06 AC 141 ms
54,016 KB
testcase_07 AC 141 ms
54,088 KB
testcase_08 AC 142 ms
54,072 KB
testcase_09 AC 144 ms
54,144 KB
testcase_10 AC 141 ms
53,992 KB
testcase_11 AC 144 ms
54,124 KB
testcase_12 AC 133 ms
54,020 KB
testcase_13 AC 131 ms
53,748 KB
testcase_14 AC 131 ms
54,200 KB
testcase_15 AC 129 ms
54,008 KB
testcase_16 AC 144 ms
54,192 KB
testcase_17 AC 144 ms
54,080 KB
testcase_18 AC 153 ms
54,032 KB
testcase_19 AC 162 ms
53,964 KB
testcase_20 AC 160 ms
54,028 KB
testcase_21 AC 150 ms
54,136 KB
testcase_22 AC 149 ms
54,112 KB
testcase_23 AC 153 ms
53,932 KB
testcase_24 AC 154 ms
54,240 KB
testcase_25 AC 147 ms
54,108 KB
testcase_26 AC 130 ms
53,972 KB
権限があれば一括ダウンロードができます

ソースコード

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];
		int[] t = new int[n];
		for(int i = 0; i < n; i++){
			t[i] = sc.nextInt();
		}
		for(int i = 0; i < n; i++){
			m[sc.nextInt()] += t[i];
		}
		for(int i = 1; i < 101; i++){
			if(m[0] < m[i]){
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	}
}
0