結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー kokomi_ckokomi_c
提出日時 2023-10-06 17:17:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 379 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 128,268 KB
最終ジャッジ日時 2023-10-06 17:17:06
合計ジャッジ時間 4,718 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,596 KB
testcase_01 AC 67 ms
71,536 KB
testcase_02 AC 66 ms
71,600 KB
testcase_03 AC 109 ms
105,360 KB
testcase_04 AC 114 ms
112,708 KB
testcase_05 AC 84 ms
86,440 KB
testcase_06 AC 108 ms
111,988 KB
testcase_07 AC 140 ms
128,268 KB
testcase_08 AC 97 ms
97,912 KB
testcase_09 AC 77 ms
77,500 KB
testcase_10 AC 91 ms
90,744 KB
testcase_11 AC 141 ms
120,368 KB
testcase_12 AC 132 ms
109,160 KB
testcase_13 AC 96 ms
108,336 KB
testcase_14 AC 88 ms
99,568 KB
testcase_15 AC 88 ms
99,280 KB
testcase_16 AC 84 ms
84,436 KB
testcase_17 AC 85 ms
94,996 KB
testcase_18 AC 94 ms
107,716 KB
testcase_19 AC 86 ms
99,280 KB
testcase_20 AC 72 ms
78,648 KB
testcase_21 AC 78 ms
84,744 KB
testcase_22 AC 88 ms
97,364 KB
testcase_23 AC 93 ms
105,316 KB
testcase_24 AC 77 ms
86,536 KB
testcase_25 AC 81 ms
89,320 KB
testcase_26 AC 72 ms
77,164 KB
testcase_27 AC 80 ms
90,420 KB
testcase_28 AC 102 ms
107,820 KB
testcase_29 AC 80 ms
92,332 KB
testcase_30 AC 76 ms
85,864 KB
testcase_31 AC 95 ms
108,640 KB
testcase_32 AC 77 ms
85,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
M1 = int(input())
Am = list(map(int, input().split()))
M2 = int(input())
Bm = list(map(int, input().split()))

ts = set([i for i in range(N+1)])

last = 0
for m in range(M1):
    t = last + Am[m]
    last = t
    if t in ts:
        ts.remove(t)

last = N
for m in range(M2):
    t = last - Bm[m]
    last = t
    if t in ts:
        ts.remove(t)

print(len(ts))
0