結果

問題 No.216 FAC
ユーザー iad_2889
提出日時 2019-05-01 05:36:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 421 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-12-31 12:06:40
合計ジャッジ時間 2,108 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 RE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
questions = [(int(x),int(y)) for x,y in zip(input().split(),input().split())]
score = sum([x[0] for x in questions if not x[1]])
participants_score = [0 for x in range(N)]
for question in [x for x in questions if x[1]]:
    t_score,correcter = question
    participants_score[correcter - 1]+=t_score
winners_score = max(participants_score)
is_won = score >= winners_score
print("YES" if is_won else "NO")
0