結果

問題 No.1535 五七五
ユーザー lloyzlloyz
提出日時 2021-12-22 22:47:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 586 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 94,592 KB
最終ジャッジ日時 2023-10-15 00:44:01
合計ジャッジ時間 6,225 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,792 KB
testcase_01 AC 16 ms
7,768 KB
testcase_02 AC 16 ms
7,740 KB
testcase_03 AC 16 ms
7,804 KB
testcase_04 AC 517 ms
58,800 KB
testcase_05 AC 516 ms
94,436 KB
testcase_06 AC 586 ms
94,592 KB
testcase_07 AC 16 ms
7,904 KB
testcase_08 AC 16 ms
7,776 KB
testcase_09 AC 17 ms
7,740 KB
testcase_10 AC 16 ms
7,788 KB
testcase_11 AC 16 ms
7,768 KB
testcase_12 AC 16 ms
7,744 KB
testcase_13 AC 17 ms
7,832 KB
testcase_14 AC 16 ms
7,776 KB
testcase_15 AC 16 ms
7,788 KB
testcase_16 AC 16 ms
7,796 KB
testcase_17 AC 17 ms
7,848 KB
testcase_18 AC 415 ms
87,340 KB
testcase_19 AC 421 ms
86,960 KB
testcase_20 AC 419 ms
87,044 KB
testcase_21 AC 415 ms
87,540 KB
testcase_22 AC 414 ms
87,464 KB
testcase_23 AC 417 ms
87,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a, b, c = list(map(int, input().split()))
S = list(input().split())

Slen = [0 for _ in range(n + 1)]
for i in range(n):
    Slen[i + 1] = Slen[i] + len(S[i])

Slen = set(Slen)
ans = 0
for i in Slen:
    if (i - c in Slen) and (i - c - b in Slen) and (i - c - b - a in Slen):
        ans += 1
print(ans)
0