結果

問題 No.216 FAC
ユーザー boya978boya978
提出日時 2019-09-05 04:22:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 383 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 7,956 KB
最終ジャッジ日時 2023-08-29 21:55:48
合計ジャッジ時間 2,046 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,804 KB
testcase_01 AC 16 ms
7,956 KB
testcase_02 AC 16 ms
7,808 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 15 ms
7,828 KB
testcase_08 AC 16 ms
7,868 KB
testcase_09 AC 15 ms
7,800 KB
testcase_10 AC 16 ms
7,904 KB
testcase_11 AC 15 ms
7,808 KB
testcase_12 AC 16 ms
7,924 KB
testcase_13 AC 16 ms
7,860 KB
testcase_14 AC 15 ms
7,792 KB
testcase_15 AC 15 ms
7,808 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 16 ms
7,892 KB
testcase_19 WA -
testcase_20 AC 16 ms
7,820 KB
testcase_21 RE -
testcase_22 AC 16 ms
7,808 KB
testcase_23 WA -
testcase_24 AC 15 ms
7,952 KB
testcase_25 WA -
testcase_26 AC 16 ms
7,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
scores = list(map(int,input().split()))
winners = input().split()
dict = {}

for i in range(n):
    if not winners[i] in dict:
        dict[winners[i]] = scores[i]
    else:
        dict[winners[i]] += scores[i]

K = dict["0"]
rank=[]
for key,value in dict.items():
    rank.append(value)

rank.reverse()

if K >= rank[0]:
    print("YES")
else:
    print("NO")
    

0