結果

問題 No.216 FAC
ユーザー FVRChan
提出日時 2017-12-05 22:02:19
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 1,000 ms
コード長 276 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-28 17:31:06
合計ジャッジ時間 1,863 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split(" ")))
b=list(map(int,input().split(" ")))
c=[[a[i],b[i]] for i in range(n)]
my,ps=0,[0]*100
for w in c:
    if w[1]==0:
        my+=w[0]
    else:
        ps[w[1]-1]+=w[0]
if my>=max(ps):
    print("YES")
else:
    print("NO")
    
0