https://codeforces.com/contest/1101/submission/48260797 This solution is accepted. But this gives wrong answer on below testcase: 3 1601 1601 1601 1 2 2 3 the actual answer should be 3. But this solution gives 1. Please check this issue.
Educational Round 58: weak testcases in D
https://codeforces.com/contest/1101/submission/48260797 This solution is accepted. But this gives wrong answer on below testcase: 3 1601 1601 1601 1 2 2 3 the actual answer should be 3. But this solution gives 1. Please check this issue.