結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-19 14:57:46 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 1,000 ms |
| コード長 | 248 bytes |
| コンパイル時間 | 591 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-22 22:03:18 |
| 合計ジャッジ時間 | 2,121 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
N = int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
res = [0] * 100
p = 0
for i, a in enumerate(A):
if B[i] == 0:
p += a
else:
res[B[i]-1] += a
print("YES" if p >= max(res) else "NO")