結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー kokomi_c
提出日時 2023-10-06 17:13:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 382 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 82,496 KB
実行使用メモリ 136,172 KB
最終ジャッジ日時 2024-07-26 15:31:01
合計ジャッジ時間 3,351 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
M1 = int(input())
Am = list(map(int, input().split()))
M2 = int(input())
Bm = list(map(int, input().split()))

ts = set([i for i in range(1, N+1)])

last = 0
for m in range(M1):
    t = last + Am[m]
    last = t
    if t in ts:
        ts.remove(t)

last = 0
for m in range(M2):
    t = last + Bm[m]
    last = t
    if t in ts:
        ts.remove(t)

print(len(ts))
0