結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー MottchanMottchan
提出日時 2023-08-04 21:30:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 117,120 KB
最終ジャッジ日時 2024-04-22 19:51:03
合計ジャッジ時間 3,085 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,968 KB
testcase_01 AC 37 ms
51,840 KB
testcase_02 AC 38 ms
51,968 KB
testcase_03 AC 63 ms
81,152 KB
testcase_04 AC 68 ms
85,248 KB
testcase_05 AC 56 ms
67,200 KB
testcase_06 AC 64 ms
79,744 KB
testcase_07 AC 83 ms
100,992 KB
testcase_08 AC 59 ms
76,544 KB
testcase_09 AC 46 ms
62,720 KB
testcase_10 AC 57 ms
73,600 KB
testcase_11 AC 100 ms
117,120 KB
testcase_12 AC 86 ms
105,344 KB
testcase_13 AC 47 ms
60,672 KB
testcase_14 AC 44 ms
58,880 KB
testcase_15 AC 44 ms
59,648 KB
testcase_16 AC 44 ms
59,392 KB
testcase_17 AC 45 ms
59,904 KB
testcase_18 AC 46 ms
60,032 KB
testcase_19 AC 44 ms
59,264 KB
testcase_20 AC 43 ms
59,392 KB
testcase_21 AC 43 ms
58,624 KB
testcase_22 AC 46 ms
60,416 KB
testcase_23 AC 46 ms
60,416 KB
testcase_24 AC 47 ms
60,032 KB
testcase_25 AC 45 ms
59,904 KB
testcase_26 AC 45 ms
59,776 KB
testcase_27 AC 43 ms
58,752 KB
testcase_28 AC 46 ms
58,880 KB
testcase_29 AC 44 ms
59,520 KB
testcase_30 AC 43 ms
58,752 KB
testcase_31 AC 47 ms
60,800 KB
testcase_32 AC 43 ms
58,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
TF=[True]*(n+1)

m1 = int(input())
lm1 = list(map(int,input().split()))
m2 = int(input())
lm2 = list(map(int,input().split()))

a=0
TF[a] = False
for i in range(m1):
    a+=lm1[i]
    TF[a] = False


for i in range(m2):
    a-=lm2[i]
    TF[a] = False

ans=0
for i in range(n):
    if TF[i]:
        ans+=1
print(ans)
0