結果

問題 No.216 FAC
コンテスト
ユーザー yaoshimax
提出日時 2015-05-27 00:58:58
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 84 ms / 1,000 ms
コード長 255 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 126 ms
コンパイル使用メモリ 77,628 KB
最終ジャッジ日時 2025-12-03 15:16:54
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N=int(raw_input())
A=map(int,raw_input().split())
B=map(int,raw_input().split())
score=[0 for i in range(101)]
maxScore=0
for a,b in zip(A,B):
    score[b]+=a
    maxScore=max(maxScore,score[b])
if maxScore==score[0]:
    print "YES"
else:
    print "NO"
0