I have noticed that the problem statement of https://www.codechef.com/problems/G3 is incorrect. Firstly, the condition 1 <= p1 < p2 < … < pn <= 10 in the input does not make sense as n can be up to 10000. The condition also is not true in the tests (checked using assert). Additionally, the link of the figure used in the statement is broken.
Just wanted to report it. Hopefully, the statement will be fixed as the problem itself is nice