結果

問題 No.216 FAC
ユーザー TatsuDXTatsuDX
提出日時 2016-09-09 00:35:34
言語 Java19
(openjdk 21)
結果
AC  
実行時間 144 ms / 1,000 ms
コード長 464 bytes
コンパイル時間 3,213 ms
コンパイル使用メモリ 71,848 KB
実行使用メモリ 55,988 KB
最終ジャッジ日時 2023-08-10 00:18:09
合計ジャッジ時間 8,099 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,696 KB
testcase_01 AC 127 ms
55,540 KB
testcase_02 AC 123 ms
55,412 KB
testcase_03 AC 141 ms
55,944 KB
testcase_04 AC 133 ms
55,856 KB
testcase_05 AC 134 ms
55,404 KB
testcase_06 AC 126 ms
55,720 KB
testcase_07 AC 124 ms
55,624 KB
testcase_08 AC 124 ms
55,544 KB
testcase_09 AC 125 ms
55,612 KB
testcase_10 AC 125 ms
55,424 KB
testcase_11 AC 124 ms
55,544 KB
testcase_12 AC 124 ms
55,820 KB
testcase_13 AC 124 ms
55,876 KB
testcase_14 AC 122 ms
55,988 KB
testcase_15 AC 123 ms
55,312 KB
testcase_16 AC 141 ms
55,664 KB
testcase_17 AC 141 ms
55,744 KB
testcase_18 AC 142 ms
55,904 KB
testcase_19 AC 141 ms
55,724 KB
testcase_20 AC 143 ms
55,960 KB
testcase_21 AC 142 ms
55,600 KB
testcase_22 AC 143 ms
55,664 KB
testcase_23 AC 142 ms
55,612 KB
testcase_24 AC 143 ms
53,500 KB
testcase_25 AC 144 ms
55,644 KB
testcase_26 AC 125 ms
55,872 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