結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー hato336hato336
提出日時 2023-08-05 08:47:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 186 ms / 2,000 ms
コード長 573 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 82,120 KB
実行使用メモリ 152,920 KB
最終ジャッジ日時 2024-04-23 06:29:37
合計ジャッジ時間 5,600 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
85,892 KB
testcase_01 AC 114 ms
85,800 KB
testcase_02 AC 114 ms
85,880 KB
testcase_03 AC 151 ms
113,652 KB
testcase_04 AC 149 ms
119,944 KB
testcase_05 AC 129 ms
95,248 KB
testcase_06 AC 144 ms
113,140 KB
testcase_07 AC 168 ms
136,764 KB
testcase_08 AC 139 ms
107,184 KB
testcase_09 AC 126 ms
89,944 KB
testcase_10 AC 144 ms
101,684 KB
testcase_11 AC 186 ms
152,920 KB
testcase_12 AC 184 ms
145,368 KB
testcase_13 AC 136 ms
89,952 KB
testcase_14 AC 125 ms
85,908 KB
testcase_15 AC 115 ms
85,780 KB
testcase_16 AC 120 ms
89,724 KB
testcase_17 AC 121 ms
89,884 KB
testcase_18 AC 113 ms
85,984 KB
testcase_19 AC 117 ms
85,616 KB
testcase_20 AC 130 ms
90,044 KB
testcase_21 AC 123 ms
85,916 KB
testcase_22 AC 130 ms
89,904 KB
testcase_23 AC 130 ms
89,760 KB
testcase_24 AC 125 ms
89,668 KB
testcase_25 AC 124 ms
89,616 KB
testcase_26 AC 130 ms
89,596 KB
testcase_27 AC 127 ms
85,976 KB
testcase_28 AC 113 ms
85,836 KB
testcase_29 AC 118 ms
85,912 KB
testcase_30 AC 124 ms
86,004 KB
testcase_31 AC 121 ms
89,876 KB
testcase_32 AC 113 ms
85,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
n = int(input())
#alist = list(map(int,input().split()))
#alist = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
#    alist.append(list(map(int,input().split())))
m = int(input())
alist = list(map(int,input().split()))
m = int(input())
blist = list(map(int,input().split()))
ans = set()
temp = 0
ans.add(temp)
for i in alist:
    temp += i
    ans.add(temp)
for i in blist:
    temp -= i
    ans.add(temp)
print(n+1-len(ans))
0