結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー ああいいああいい
提出日時 2023-08-05 16:00:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 82,332 KB
実行使用メモリ 111,696 KB
最終ジャッジ日時 2024-04-23 13:10:39
合計ジャッジ時間 2,621 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,708 KB
testcase_01 AC 34 ms
52,312 KB
testcase_02 AC 33 ms
52,556 KB
testcase_03 AC 55 ms
81,916 KB
testcase_04 AC 59 ms
85,336 KB
testcase_05 AC 44 ms
68,544 KB
testcase_06 AC 54 ms
80,840 KB
testcase_07 AC 73 ms
100,860 KB
testcase_08 AC 50 ms
76,088 KB
testcase_09 AC 41 ms
62,560 KB
testcase_10 AC 48 ms
73,252 KB
testcase_11 AC 85 ms
111,696 KB
testcase_12 AC 73 ms
104,856 KB
testcase_13 AC 39 ms
60,288 KB
testcase_14 AC 36 ms
59,236 KB
testcase_15 AC 36 ms
58,692 KB
testcase_16 AC 37 ms
60,592 KB
testcase_17 AC 43 ms
59,708 KB
testcase_18 AC 39 ms
59,656 KB
testcase_19 AC 36 ms
60,036 KB
testcase_20 AC 39 ms
59,468 KB
testcase_21 AC 37 ms
59,088 KB
testcase_22 AC 38 ms
60,656 KB
testcase_23 AC 42 ms
61,060 KB
testcase_24 AC 38 ms
59,764 KB
testcase_25 AC 38 ms
59,868 KB
testcase_26 AC 36 ms
59,396 KB
testcase_27 AC 38 ms
58,444 KB
testcase_28 AC 36 ms
59,332 KB
testcase_29 AC 37 ms
58,340 KB
testcase_30 AC 36 ms
57,508 KB
testcase_31 AC 38 ms
61,776 KB
testcase_32 AC 37 ms
58,056 KB
権限があれば一括ダウンロードができます

ソースコード

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