12831 - Maze Cost Sorting   

Description

HINT: 
It is not necessary to traverse through the maze.
You can use "for loop" to check each node to count the number of neighbors for each node.

Input

Output

Sample Input  Download

Sample Output  Download

Tags




Discuss