結果

問題 No.216 FAC
ユーザー R NR N
提出日時 2020-09-24 14:23:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 418 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2023-09-10 13:27:02
合計ジャッジ時間 1,650 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,780 KB
testcase_01 AC 17 ms
7,780 KB
testcase_02 AC 16 ms
7,836 KB
testcase_03 AC 15 ms
7,864 KB
testcase_04 AC 15 ms
7,740 KB
testcase_05 AC 15 ms
7,860 KB
testcase_06 AC 15 ms
7,924 KB
testcase_07 AC 16 ms
7,828 KB
testcase_08 AC 15 ms
7,812 KB
testcase_09 AC 15 ms
7,736 KB
testcase_10 AC 15 ms
7,832 KB
testcase_11 AC 16 ms
7,780 KB
testcase_12 AC 15 ms
7,900 KB
testcase_13 AC 15 ms
7,880 KB
testcase_14 AC 15 ms
7,696 KB
testcase_15 AC 15 ms
7,780 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 16 ms
7,728 KB
testcase_19 WA -
testcase_20 AC 15 ms
7,784 KB
testcase_21 AC 15 ms
7,936 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 15 ms
7,812 KB
testcase_25 WA -
testcase_26 AC 15 ms
7,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding=utf-8:

n = int(input())
q = list(map(int ,input().split()))
p = list(map(int, input().split()))
score = list()
o_score = 0
k_score = 0
for i, j in zip(q, p):
    if j == 0:
        k_score += i
    else:
        score.append(i)

if len(score) == 0:
    o_score = 0
elif len(score) == 1:
    o_score = score[0]
else:
    o_score = min(set(score))

if k_score >= o_score:
    print("YES")
else:
    print("NO")
0