結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー FromBooskaFromBooska
提出日時 2023-08-05 10:44:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 373 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 82,412 KB
実行使用メモリ 116,940 KB
最終ジャッジ日時 2024-04-23 08:06:16
合計ジャッジ時間 2,961 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
52,948 KB
testcase_01 AC 42 ms
52,864 KB
testcase_02 AC 38 ms
52,672 KB
testcase_03 AC 68 ms
81,976 KB
testcase_04 AC 67 ms
84,912 KB
testcase_05 AC 48 ms
67,036 KB
testcase_06 AC 60 ms
79,912 KB
testcase_07 AC 80 ms
100,908 KB
testcase_08 AC 58 ms
76,372 KB
testcase_09 AC 46 ms
63,276 KB
testcase_10 AC 56 ms
73,296 KB
testcase_11 AC 98 ms
116,940 KB
testcase_12 AC 84 ms
105,012 KB
testcase_13 AC 44 ms
61,604 KB
testcase_14 AC 44 ms
58,892 KB
testcase_15 AC 43 ms
58,576 KB
testcase_16 AC 44 ms
59,808 KB
testcase_17 AC 44 ms
60,184 KB
testcase_18 AC 43 ms
59,224 KB
testcase_19 AC 41 ms
59,960 KB
testcase_20 AC 42 ms
60,288 KB
testcase_21 AC 42 ms
57,780 KB
testcase_22 AC 44 ms
60,168 KB
testcase_23 AC 45 ms
61,028 KB
testcase_24 AC 44 ms
59,264 KB
testcase_25 AC 44 ms
59,056 KB
testcase_26 AC 42 ms
59,428 KB
testcase_27 AC 42 ms
58,604 KB
testcase_28 AC 43 ms
59,600 KB
testcase_29 AC 43 ms
58,800 KB
testcase_30 AC 42 ms
58,340 KB
testcase_31 AC 45 ms
60,572 KB
testcase_32 AC 42 ms
58,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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
stairs[N] = 0
current = 0
for i in range(M1):
    current += A[i]
    stairs[current] = 0
current = N
for i in range(M2):
    current -= B[i]
    stairs[current] = 0
    
#print(stairs)

ans = sum(stairs)
print(ans)
0