結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー nikoro256nikoro256
提出日時 2023-08-04 21:44:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 477 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 118,112 KB
最終ジャッジ日時 2024-04-22 20:05:13
合計ジャッジ時間 2,930 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
53,248 KB
testcase_01 AC 41 ms
53,376 KB
testcase_02 AC 38 ms
53,376 KB
testcase_03 AC 90 ms
98,304 KB
testcase_04 AC 97 ms
101,760 KB
testcase_05 AC 61 ms
75,008 KB
testcase_06 AC 82 ms
96,640 KB
testcase_07 AC 111 ms
103,296 KB
testcase_08 AC 82 ms
90,880 KB
testcase_09 AC 56 ms
66,304 KB
testcase_10 AC 72 ms
84,480 KB
testcase_11 AC 133 ms
118,112 KB
testcase_12 AC 119 ms
106,240 KB
testcase_13 AC 48 ms
60,288 KB
testcase_14 AC 41 ms
54,016 KB
testcase_15 AC 41 ms
53,504 KB
testcase_16 AC 47 ms
60,160 KB
testcase_17 AC 48 ms
60,032 KB
testcase_18 AC 42 ms
54,016 KB
testcase_19 AC 43 ms
53,888 KB
testcase_20 AC 46 ms
60,032 KB
testcase_21 AC 43 ms
53,888 KB
testcase_22 AC 46 ms
59,776 KB
testcase_23 AC 44 ms
60,032 KB
testcase_24 AC 47 ms
60,032 KB
testcase_25 AC 46 ms
59,648 KB
testcase_26 AC 49 ms
60,416 KB
testcase_27 AC 41 ms
54,016 KB
testcase_28 AC 40 ms
53,504 KB
testcase_29 AC 41 ms
54,016 KB
testcase_30 AC 42 ms
53,504 KB
testcase_31 AC 45 ms
59,648 KB
testcase_32 AC 40 ms
53,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
N=int(input())
M1=int(input())
A=list(map(int,input().split()))
M2=int(input())
B=list(map(int,input().split()))
dic=defaultdict(int)
count=0
for i in range(M1):
    count+=A[i]
    dic[count]+=1
count=N
for i in range(M2):
    count-=B[i]
    dic[count]+=1
print(N+1-len(dic))
0