Rosetta Problems

Another Long Sequence Inversion

https://atcoder.jp/contests/tupc2024/tasks/tupc2024_f