結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー ああいいああいい
提出日時 2023-08-05 16:00:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 102 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 1,369 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 111,104 KB
最終ジャッジ日時 2024-10-15 13:06:35
合計ジャッジ時間 3,854 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
N = n
m = int(input())
A = list(map(int,input().split()))
ans = [0] * (N + 1)
now = 0
ans[0] = 1
for a in A:
	now += a
	ans[now] = 1
m = int(input())
B = list(map(int,input().split()))
for b in B:
	now -= b
	ans[now] = 1
print(N + 1 - sum(ans))
0