Cannot figure out why no test cases are passing

I believe the logic is correct and the custom cases are giving correct output but none of the test cases are passing

Save your code on ide.codingblocks.com and share its link.

Consider a case:
1
25
37 45
75 76
76 91
64 78
10 53
13 24
94 99
89 92
82 84
77 87
65 73
55 77
43 99
32 37
90 95
30 53
97 99
77 91
93 99
13 64
26 51
7 39
31 50
11 14
33 79

The output must be 8.(but your code gives 7)
It is formed by picking activities:
32 37
37 45
65 73
75 76
82 84
89 92
97 99

Refer this https://ide.codingblocks.com/s/283247

got it…thnx alot!!!