結果
| 問題 | No.1535 五七五 |
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2021-06-15 11:14:42 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 315 ms / 2,000 ms |
| コード長 | 350 bytes |
| 記録 | |
| コンパイル時間 | 313 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 298,252 KB |
| 最終ジャッジ日時 | 2026-06-01 02:36:33 |
| 合計ジャッジ時間 | 5,324 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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