結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-12-02 14:58:39 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 310 bytes |
| 記録 | |
| コンパイル時間 | 419 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 14,720 KB |
| 最終ジャッジ日時 | 2026-12-02 14:58:44 |
| 合計ジャッジ時間 | 3,633 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | AC * 5 RE * 19 |
ソースコード
N = int(input())
A = [*map(int, input().split())]
B = [*map(int, input().split())]
stack = {}
for i in range(N):
stack[B[i]] = stack.get(B[i], 0) + A[i]
if sorted(B)[0]!=0:
print("NO")
elif max(stack.values) == stack[0]:
print("YES")
else:
print("NO")