結果

問題 No.216 FAC
ユーザー motor_radialmotor_radial
提出日時 2019-07-30 09:13:59
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 248 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-02 15:36:47
合計ジャッジ時間 1,949 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
score=0
num=[0]*101
for i in range(N):
    if B[i]==0:
        score+=A[i]
    else:
        num[B[i]]+=A[i]
if score>=max(num):
    print("YES")
else:
    print("NO")
0