結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-09 21:04:39 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 77 ms / 1,000 ms |
| + 575µs | |
| コード長 | 363 bytes |
| 記録 | |
| コンパイル時間 | 238 ms |
| コンパイル使用メモリ | 95,984 KB |
| 実行使用メモリ | 79,616 KB |
| 最終ジャッジ日時 | 2026-08-26 12:39:32 |
| 合計ジャッジ時間 | 3,920 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
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())))