USACO 2021 January Contest, Gold Problem 2. Telephone
USACO 2021 January Contest, Gold Problem 2. Telephone Farmer John's NN cows, conveniently numbered 1…N1…N, are standing in a line (1≤N≤5⋅1041≤N≤5⋅104). The iith cow has a breed identifier bibi in t...