Please show me your “other inputs”.
And check for example something like this:
999990000 1000000000 1
999990000 1000000000 2
999990000 1000000000 3
999990000 1000000000 4
...
etc
My expection from your program in this cases is only to make any answer in time limit.
Yes of course. My suggestion, rethinking and start coding from beginning.