結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー 310icecrystal310icecrystal
提出日時 2023-08-05 00:14:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 116,992 KB
最終ジャッジ日時 2024-04-22 22:36:29
合計ジャッジ時間 2,429 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
51,712 KB
testcase_01 AC 32 ms
52,224 KB
testcase_02 AC 33 ms
51,712 KB
testcase_03 AC 57 ms
80,768 KB
testcase_04 AC 58 ms
85,248 KB
testcase_05 AC 42 ms
66,816 KB
testcase_06 AC 55 ms
79,744 KB
testcase_07 AC 74 ms
100,224 KB
testcase_08 AC 52 ms
76,172 KB
testcase_09 AC 39 ms
62,336 KB
testcase_10 AC 47 ms
72,704 KB
testcase_11 AC 90 ms
116,992 KB
testcase_12 AC 76 ms
104,524 KB
testcase_13 AC 39 ms
61,928 KB
testcase_14 AC 39 ms
58,448 KB
testcase_15 AC 37 ms
59,044 KB
testcase_16 AC 36 ms
60,488 KB
testcase_17 AC 36 ms
59,864 KB
testcase_18 AC 37 ms
60,456 KB
testcase_19 AC 37 ms
59,220 KB
testcase_20 AC 36 ms
59,800 KB
testcase_21 AC 38 ms
58,276 KB
testcase_22 AC 46 ms
59,696 KB
testcase_23 AC 40 ms
60,628 KB
testcase_24 AC 38 ms
59,116 KB
testcase_25 AC 39 ms
59,104 KB
testcase_26 AC 38 ms
60,260 KB
testcase_27 AC 36 ms
57,808 KB
testcase_28 AC 37 ms
58,088 KB
testcase_29 AC 36 ms
59,044 KB
testcase_30 AC 37 ms
58,544 KB
testcase_31 AC 39 ms
61,568 KB
testcase_32 AC 36 ms
58,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

is_dirty = [False]*(N+1)
now = 0
for a in A:
    now += a
    is_dirty[now] = True
for b in B:
    now -= b
    is_dirty[now] = True
print(is_dirty.count(False))
0