結果
| 問題 |
No.1535 五七五
|
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2021-06-15 11:14:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 520 ms / 2,000 ms |
| コード長 | 350 bytes |
| コンパイル時間 | 544 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 250,764 KB |
| 最終ジャッジ日時 | 2024-12-26 06:11:46 |
| 合計ジャッジ時間 | 7,993 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
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)
H20