blob: 0e3ed392cccc94bf2489cd76c69da8a03072c97f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
using Test
input = open(read, "input")
unique_slice(arr, i, l) = arr[i-l+1:i] |> unique |> length == l
@testset "solution" begin
@test [
findfirst(unique_slice(input, i, k) for i = k:length(input)-k+1) + k - 1 for
k ∈ (4, 14)
] == [1655, 2665]
end
|