結果

問題 No.1535 五七五
ユーザー 👑 H20H20
提出日時 2021-06-15 11:14:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 438 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 650 ms
コンパイル使用メモリ 86,820 KB
実行使用メモリ 256,980 KB
最終ジャッジ日時 2023-08-27 01:39:50
合計ジャッジ時間 7,350 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
71,760 KB
testcase_01 AC 95 ms
71,572 KB
testcase_02 AC 96 ms
71,692 KB
testcase_03 AC 96 ms
71,540 KB
testcase_04 AC 272 ms
195,680 KB
testcase_05 AC 326 ms
256,208 KB
testcase_06 AC 305 ms
256,980 KB
testcase_07 AC 96 ms
71,404 KB
testcase_08 AC 95 ms
71,724 KB
testcase_09 AC 94 ms
71,408 KB
testcase_10 AC 94 ms
71,784 KB
testcase_11 AC 92 ms
71,796 KB
testcase_12 AC 94 ms
71,716 KB
testcase_13 AC 97 ms
71,768 KB
testcase_14 AC 97 ms
71,472 KB
testcase_15 AC 95 ms
71,572 KB
testcase_16 AC 94 ms
71,864 KB
testcase_17 AC 93 ms
71,596 KB
testcase_18 AC 427 ms
250,392 KB
testcase_19 AC 437 ms
249,980 KB
testcase_20 AC 431 ms
249,800 KB
testcase_21 AC 437 ms
249,892 KB
testcase_22 AC 438 ms
250,080 KB
testcase_23 AC 435 ms
250,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
import itertools

N = int(input())
A,B,C = map(int,input().split())
SS = input().split()
L = [0]
for s in SS:
    L.append(len(s))
AC = list(itertools.accumulate(L))
d = collections.defaultdict(int)
for ac in AC:
    d[ac]=1
ans = 0
for ac in AC:
    if d[ac+A]==1 and d[ac+A+B]==1 and d[ac+A+B+C]==1:
        ans+=1
print(ans)



0