結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー komkompikomkompi
提出日時 2023-08-04 23:19:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 82,168 KB
実行使用メモリ 117,428 KB
最終ジャッジ日時 2024-04-22 21:43:18
合計ジャッジ時間 2,910 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,156 KB
testcase_01 AC 36 ms
53,636 KB
testcase_02 AC 36 ms
53,044 KB
testcase_03 AC 59 ms
81,808 KB
testcase_04 AC 62 ms
85,456 KB
testcase_05 AC 48 ms
67,736 KB
testcase_06 AC 60 ms
80,096 KB
testcase_07 AC 75 ms
101,180 KB
testcase_08 AC 54 ms
76,148 KB
testcase_09 AC 44 ms
63,212 KB
testcase_10 AC 52 ms
72,584 KB
testcase_11 AC 92 ms
117,428 KB
testcase_12 AC 78 ms
105,180 KB
testcase_13 AC 43 ms
60,844 KB
testcase_14 AC 41 ms
59,572 KB
testcase_15 AC 39 ms
58,952 KB
testcase_16 AC 42 ms
60,528 KB
testcase_17 AC 41 ms
59,876 KB
testcase_18 AC 40 ms
59,608 KB
testcase_19 AC 41 ms
58,488 KB
testcase_20 AC 41 ms
59,996 KB
testcase_21 AC 40 ms
58,344 KB
testcase_22 AC 43 ms
60,800 KB
testcase_23 AC 42 ms
61,104 KB
testcase_24 AC 41 ms
59,324 KB
testcase_25 AC 41 ms
58,804 KB
testcase_26 AC 39 ms
59,084 KB
testcase_27 AC 41 ms
58,628 KB
testcase_28 AC 41 ms
58,864 KB
testcase_29 AC 41 ms
58,196 KB
testcase_30 AC 40 ms
59,060 KB
testcase_31 AC 42 ms
60,168 KB
testcase_32 AC 40 ms
58,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!

N=int(input())

M1=int(input())
A=list(map(int,input().split()))

M2=int(input())
B=list(map(int,input().split()))

stairs=[1]*(N+1)
stairs[0]=0

now=0
for a in A:
    now+=a
    stairs[now]=0
    
for b in B:
    now-=b
    stairs[now]=0
    

print(sum(stairs))
    
0