結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー 👑 rin204rin204
提出日時 2023-08-05 16:24:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 218 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 129,408 KB
最終ジャッジ日時 2024-10-15 13:31:49
合計ジャッジ時間 2,913 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
input()
A = list(map(int, input().split()))
input()
B = list(map(int, input().split()))

se = {0}
x = 0
for a in A:
    x += a
    se.add(x)
for b in B:
    x -= b
    se.add(x)

print(n + 1 - len(se))
0