結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-04 06:42:35 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 1,000 ms |
| コード長 | 250 bytes |
| コンパイル時間 | 91 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-16 09:41:28 |
| 合計ジャッジ時間 | 1,643 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
lst=[0]*101
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
for i in range(n):
if b[i]!=0:lst[b[i]]+=a[i]
max_value=max(lst)
tmp1=0
for i in range(n):
if b[i]==0:tmp1+=a[i]
print(["NO","YES"][tmp1>=max_value])