The distant sequence problem from starters 69 div 3 third problem

The question isnt clear DISTINCTSEQ Problem | CodeChef
see this question and also see the solution video the question in the solution part is different from the one we got is different
in video solution they gave the condition that
Ai<Ai+1 and Bi<Bi+1 this wasnt mentioned in the question can someone help me out with this?