https://atcoder.jp/contests/practice/tasks/practice_2



In testset 3, N=5<math style="box-sizing: border-box;" xmlns="http://www.w3.org/1998/Math/MathML">N=5</math> and Q=7<math style="box-sizing: border-box;" xmlns="http://www.w3.org/1998/Math/MathML">Q=7</math>


2번셋까지는 풀었는데 3번셋에서 막히네요..