結果

問題 No.216 FAC
コンテスト
ユーザー konabe
提出日時 2018-04-18 18:10:47
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
RE  
実行時間 -
コード長 375 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 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 #
raw source code

#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