結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー shobonvipshobonvip
提出日時 2023-08-04 21:22:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 129,636 KB
最終ジャッジ日時 2024-04-22 19:37:42
合計ジャッジ時間 2,753 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,840 KB
testcase_01 AC 37 ms
51,712 KB
testcase_02 AC 37 ms
51,840 KB
testcase_03 AC 73 ms
93,312 KB
testcase_04 AC 82 ms
100,556 KB
testcase_05 AC 52 ms
71,296 KB
testcase_06 AC 70 ms
91,648 KB
testcase_07 AC 104 ms
120,320 KB
testcase_08 AC 67 ms
85,888 KB
testcase_09 AC 46 ms
62,592 KB
testcase_10 AC 61 ms
79,744 KB
testcase_11 AC 131 ms
115,456 KB
testcase_12 AC 105 ms
129,636 KB
testcase_13 AC 43 ms
58,240 KB
testcase_14 AC 37 ms
51,840 KB
testcase_15 AC 37 ms
52,480 KB
testcase_16 AC 40 ms
57,984 KB
testcase_17 AC 40 ms
58,112 KB
testcase_18 AC 37 ms
52,736 KB
testcase_19 AC 37 ms
52,224 KB
testcase_20 AC 41 ms
57,984 KB
testcase_21 AC 39 ms
52,096 KB
testcase_22 AC 42 ms
58,240 KB
testcase_23 AC 41 ms
58,112 KB
testcase_24 AC 40 ms
58,240 KB
testcase_25 AC 43 ms
58,112 KB
testcase_26 AC 42 ms
58,240 KB
testcase_27 AC 38 ms
51,840 KB
testcase_28 AC 38 ms
51,584 KB
testcase_29 AC 36 ms
52,224 KB
testcase_30 AC 36 ms
52,352 KB
testcase_31 AC 40 ms
58,112 KB
testcase_32 AC 37 ms
51,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
m1 = int(input())
a = list(map(int,input().split()))
m2 = int(input())
b = list(map(int,input().split()))
r = set()
tmp = 0
r.add(0)
for i in range(m1):
	tmp += a[i]
	r.add(tmp)
for i in range(m2):
	tmp -= b[i]
	r.add(tmp)
print(n + 1 - len(r))
0