結果

問題 No.216 FAC
ユーザー iad_2889iad_2889
提出日時 2019-05-01 05:36:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 421 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 7,968 KB
最終ジャッジ日時 2023-08-30 04:14:44
合計ジャッジ時間 1,850 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,748 KB
testcase_01 AC 15 ms
7,812 KB
testcase_02 AC 16 ms
7,752 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 16 ms
7,804 KB
testcase_07 AC 16 ms
7,792 KB
testcase_08 AC 16 ms
7,752 KB
testcase_09 AC 16 ms
7,824 KB
testcase_10 AC 15 ms
7,796 KB
testcase_11 AC 15 ms
7,784 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 AC 16 ms
7,772 KB
testcase_15 RE -
testcase_16 AC 16 ms
7,880 KB
testcase_17 AC 15 ms
7,836 KB
testcase_18 AC 16 ms
7,824 KB
testcase_19 AC 16 ms
7,916 KB
testcase_20 AC 16 ms
7,812 KB
testcase_21 AC 16 ms
7,780 KB
testcase_22 AC 16 ms
7,816 KB
testcase_23 AC 16 ms
7,772 KB
testcase_24 AC 16 ms
7,792 KB
testcase_25 AC 16 ms
7,772 KB
testcase_26 RE -
権限があれば一括ダウンロードができます

ソースコード

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