結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 15 ms
7,908 KB
testcase_02 AC 15 ms
7,732 KB
testcase_03 AC 16 ms
7,804 KB
testcase_04 WA -
testcase_05 AC 15 ms
7,804 KB
testcase_06 WA -
testcase_07 AC 16 ms
7,856 KB
testcase_08 AC 16 ms
7,864 KB
testcase_09 AC 16 ms
7,860 KB
testcase_10 AC 15 ms
7,808 KB
testcase_11 WA -
testcase_12 AC 15 ms
7,788 KB
testcase_13 AC 15 ms
7,884 KB
testcase_14 AC 16 ms
7,812 KB
testcase_15 AC 16 ms
7,840 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 16 ms
7,864 KB
testcase_19 AC 15 ms
7,900 KB
testcase_20 AC 16 ms
7,860 KB
testcase_21 AC 15 ms
7,728 KB
testcase_22 WA -
testcase_23 AC 15 ms
7,840 KB
testcase_24 AC 15 ms
7,856 KB
testcase_25 WA -
testcase_26 AC 15 ms
7,784 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 <= 1:
        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 = max(set(score))

#print(o_score)
#print(k_score)

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