結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー なえしら
提出日時 2024-08-16 22:35:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 82,284 KB
実行使用メモリ 142,028 KB
最終ジャッジ日時 2024-08-16 22:35:38
合計ジャッジ時間 3,000 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate
from operator import sub

N = int(input())
M = int(input())
A = list(map(int, input().split()))
L = int(input())
B = list(map(int, input().split()))

S = set(accumulate(A, initial=0))
T = set(accumulate(B, initial=N, func=sub))
U = S | T

print(N + 1 - len(U))
0