結果

問題 No.2401 Dirty Shoes and Stairs
コンテスト
ユーザー kokomi_c
提出日時 2023-10-06 17:13:30
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 382 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 152 ms
コンパイル使用メモリ 85,632 KB
実行使用メモリ 142,592 KB
最終ジャッジ日時 2026-04-03 17:27:05
合計ジャッジ時間 2,775 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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