In the sample input of the week problem, I have a question regarding the second case:
2
4
0 1
3 4
1 4
4 4
3 2
5 6
Which means the start is 0 1 and the end 3 4 and there are 2 spaces. Then why isn't the sequence 0 1 : 1 4 : 4 4 : 4 3 valid? The sample output clearly says NO.