Problem during executing shortest path string program

what is wrong with my code.
code link : https://ide.codingblocks.com/s/230763

and also what is meaning of following errors:

runguard: warning: timelimit exceeded (wall time): aborting command

runguard: warning: command terminated with signal 15

hi @sk1 the problem is that you did not use “enter” while giving input, so the while loop executes endlessly. If you press enter after giving input, it will run perfectly.

what does “signal 15” denotes

@sk1 it is an internal error raised by the ide, in case of a TLE