10219

Find the ways !
Type:
Counting
Diff: 4.0

Critical Input

4 2
10 5
49 6
2000000000 0
2000000000 1
2000000000 1999999999
2000000000 2000000000
65000 2
65000 64998
64999 2
64999 64997
2300 3
2300 2297
400 4
100 5
100 6
70 7
50 8
40 9
40 10
33 11
33 12
33 13
33 14
33 15
33 16
0 0

Output of The Input

1
3
8
1
10
10
1
10
10
10
10
10
10
10
8
10
10
9
9
9
9
9
9
9
10
10
1

If you have any advice, complements 

or proposal, please  Send mail to Author

Submit

 

1