Hello,
I have noticed that the problem statement of G3 Problem - CodeChef 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