結果

問題 No.216 FAC
ユーザー lllllll88938494
提出日時 2023-05-30 20:57:24
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 200 bytes
コンパイル時間 1,294 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 64,896 KB
最終ジャッジ日時 2024-12-28 13:00:42
合計ジャッジ時間 2,972 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 RE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))

ans =[0]*(n+1)
for i in range(n):
    ans[b[i]] += a[i]

if max(ans) ==ans[0]:
    print('YES')
else:
    print('NO')
0