A program to count the number of distinct trips that can be made from a designated starting station back to itself using a specified number of tickets. For example given
3 4
0 1
2 1
the out put is 2. displayed in test0.dat
However given
100 8
0 1
0 2
0 3
â‹®
0 99
1 2
1 3
â‹®
98 99
The output should be 92274469442793 (test1.dat).
The first line of input fill will contain two integers, N, and k. N is the number of stations in the subway system, 1≤N≤100. k is the number of tickets to be used up, 1≤k≤10.
The question is why the output is not 92274469442793 without using recursion. Only the trip counter function can be altered.