結果

問題 No.216 FAC
ユーザー GrayCoder
提出日時 2017-10-09 01:26:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 347 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-17 05:51:48
合計ジャッジ時間 1,642 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    A = tuple(map(int, input().split()))
    B = tuple(map(int, input().split()))

    score = dict()
    for i, j in zip(A, B):
        score[j] = score.get(j, 0) + i

    k = score[0]
    for i in score.values():
        if k < i:
            print('NO')
            break
    else:
        print('YES')

main()
0