|
Time |
Memory |
| Case 1 |
1 sec |
32 MB |
| Case 2 |
1 sec |
32 MB |
| Case 3 |
1 sec |
32 MB |
| Case 4 |
1 sec |
32 MB |
| Case 5 |
1 sec |
32 MB |
Description
- Let’s develop a program to sort the cost of building mazes.
- Hint: It is not necessary to solve the mazes to obtain the cost of the mazes. You can use "for loop" to count the number.
- Cost factors (more is costlier)
- N4: Number of crossroads
- N3: Number of T junctions
- N1: Number of dead ends
- Note that the entry and target are not dead ends
- Overall cost
- Tie breaker
- N4 --> N3 --> Larger serial number is costlier
- Example

Input

Output

Tags