2022-12-06 07:57:31 +01:00
|
|
|
import Data.List
|
2022-12-06 08:26:56 +01:00
|
|
|
import Data.Maybe
|
2022-12-06 07:57:31 +01:00
|
|
|
|
|
|
|
-- literally only changes this one constant
|
|
|
|
markerLength = 14
|
|
|
|
|
|
|
|
main = interact $
|
|
|
|
show
|
2022-12-06 08:26:56 +01:00
|
|
|
. (+ 1)
|
|
|
|
. fromJust . (\l -> find (\i -> markerLength == length (nub $ map (l !!) [i - (markerLength - 1) .. i])) [(markerLength - 1)..])
|