Skip to content

textureanalysis

bradendubois edited this page Nov 8, 2021 · 7 revisions

Texture Analysis

ID: textureanalysis

Difficulty: 2.7

CPU Time: 1 second

Memory: 1024 MB

Solution

For this, eliminate easy cases by checking; if there is no "." anywhere in the string, it's even. Otherwise, take the largest prefix of the string such that it consists of "*" and some number of consecutive "."s. Then, jumping ahead in the string by the length of this constructed string; these overlapping substrings must match. Repeat this until the end of the string.

Clone this wiki locally