結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-01 23:01:50 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 330 bytes |
| 記録 | |
| コンパイル時間 | 296 ms |
| コンパイル使用メモリ | 21,536 KB |
| 実行使用メモリ | 15,996 KB |
| 最終ジャッジ日時 | 2026-08-07 04:06:31 |
| 合計ジャッジ時間 | 4,720 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 14 WA * 10 |
ソースコード
n=int(input())
sl=list(map(int,input().split()))
tl=input().split()
d={}
for i in range(n):
if tl[i] not in d:
d[tl[i]]=sl[i]
else:
d[tl[i]]+=sl[i]
dic2 = sorted(d.items(), key=lambda x:x[1], reverse=True)
if '0' not in dic2:
print("NO")
elif d['0']==dic2[0][1]:
print("YES")
else:
print("NO")