G. Jumping Path
time limit per test
10 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output