結果
| 問題 |
No.2401 Dirty Shoes and Stairs
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-06 17:16:11 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 385 bytes |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 82,772 KB |
| 実行使用メモリ | 136,276 KB |
| 最終ジャッジ日時 | 2024-07-26 15:31:07 |
| 合計ジャッジ時間 | 3,072 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 22 |
ソースコード
N = int(input())
M1 = int(input())
Am = list(map(int, input().split()))
M2 = int(input())
Bm = list(map(int, input().split()))[::-1]
ts = set([i for i in range(N+1)])
last = 0
for m in range(M1):
t = last + Am[m]
last = t
if t in ts:
ts.remove(t)
last = N
for m in range(M2):
t = last - Bm[m]
last = t
if t in ts:
ts.remove(t)
print(len(ts))