結果

問題 No.1535 五七五
ユーザー 👑 KazunKazun
提出日時 2021-06-06 18:13:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 267 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 207,456 KB
最終ジャッジ日時 2023-08-15 00:20:10
合計ジャッジ時間 5,575 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,404 KB
testcase_01 AC 73 ms
71,316 KB
testcase_02 AC 79 ms
71,436 KB
testcase_03 AC 74 ms
71,268 KB
testcase_04 AC 217 ms
192,588 KB
testcase_05 AC 251 ms
205,748 KB
testcase_06 AC 248 ms
207,456 KB
testcase_07 AC 75 ms
71,396 KB
testcase_08 AC 75 ms
71,372 KB
testcase_09 AC 74 ms
71,308 KB
testcase_10 AC 76 ms
71,436 KB
testcase_11 AC 74 ms
71,324 KB
testcase_12 AC 75 ms
71,172 KB
testcase_13 AC 75 ms
71,268 KB
testcase_14 AC 75 ms
71,176 KB
testcase_15 AC 74 ms
71,424 KB
testcase_16 AC 73 ms
71,168 KB
testcase_17 AC 73 ms
71,384 KB
testcase_18 AC 266 ms
201,656 KB
testcase_19 AC 267 ms
201,720 KB
testcase_20 AC 257 ms
201,624 KB
testcase_21 AC 255 ms
201,712 KB
testcase_22 AC 259 ms
201,412 KB
testcase_23 AC 264 ms
201,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
a,b,c=map(int,input().split())
S=[len(x) for x in input().split()]

S_cum=[0]*(N+1)
for i,x in enumerate(S,1):
    S_cum[i]=S_cum[i-1]+x

T=set(S_cum)

X=0
for i in range(N):
    p=S_cum[i]
    if (p+a in T) and (p+a+b in T) and (p+a+b+c in T):
        X+=1

print(X)
0