Rating:

utilizing 2-dimensional cumulative summation to optimize the time complexity

Original writeup (https://eine.tistory.com/entry/HSCTF-2020-Algorithm-Alien-Web-Broken-Token-write-up).