結果

問題 No.216 FAC
ユーザー konabe
提出日時 2018-04-18 18:10:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 375 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-27 04:31:08
合計ジャッジ時間 2,038 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#python 3.5.2

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

Scores = {}

for i, a in enumerate(A):
    if B[i] in Scores.keys():
        Scores[B[i]] += a
    else:
        Scores[B[i]] = a

res = sorted(Scores.items(), key=lambda x: x[1])
maxScore = res[-1][1]

if Scores[0] == maxScore:
    print("YES")
else:
    print("NO")   
0