How lazy is this Kattis solution (Reseto)?

unfoldr strikes again! Cool!

My solution used List at first, but it didn’t pass the time limit. Switching to Vector did make it pass!

I think the partitioning and indexing was the culprit in the List implementation.