結果

問題 No.216 FAC
ユーザー pypypymipypypymi
提出日時 2022-03-09 21:04:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 1,000 ms
コード長 363 bytes
コンパイル時間 696 ms
コンパイル使用メモリ 87,212 KB
実行使用メモリ 71,832 KB
最終ジャッジ日時 2023-10-11 22:20:50
合計ジャッジ時間 4,912 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
71,760 KB
testcase_01 AC 100 ms
71,740 KB
testcase_02 AC 99 ms
71,416 KB
testcase_03 AC 100 ms
71,832 KB
testcase_04 AC 96 ms
71,612 KB
testcase_05 AC 96 ms
71,612 KB
testcase_06 AC 98 ms
71,580 KB
testcase_07 AC 97 ms
71,272 KB
testcase_08 AC 96 ms
71,692 KB
testcase_09 AC 97 ms
71,728 KB
testcase_10 AC 96 ms
71,616 KB
testcase_11 AC 97 ms
71,560 KB
testcase_12 AC 97 ms
71,612 KB
testcase_13 AC 99 ms
71,620 KB
testcase_14 AC 97 ms
71,732 KB
testcase_15 AC 100 ms
71,484 KB
testcase_16 AC 99 ms
71,576 KB
testcase_17 AC 98 ms
71,264 KB
testcase_18 AC 99 ms
71,800 KB
testcase_19 AC 99 ms
71,644 KB
testcase_20 AC 99 ms
71,708 KB
testcase_21 AC 96 ms
71,408 KB
testcase_22 AC 97 ms
71,484 KB
testcase_23 AC 98 ms
71,500 KB
testcase_24 AC 97 ms
71,484 KB
testcase_25 AC 97 ms
71,708 KB
testcase_26 AC 97 ms
71,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
n = int(input())
an = list(map(int,input().split()))
bn = list(map(int,input().split()))
d = defaultdict(int)
for i,j in zip(an,bn):
    d[j]+=i
d = sorted(d.items())
max_v = max(d,key=lambda x:(x[1]))
#print(max_v[0])
print("YES") if max_v[0]==0 else print("NO")
#print(list(filter(lambda x:x[1]==max_v,d.items())))

    
    
0