12816 - Maze Difficulty Sorting   

Description

  • We are developing a computer game, and we need to sort mazes according to their difficulty
    • so that game levels can begin from easy mazes to difficult mazes and achieve a good game experience
  • Difficulty factors (larger is better)*

    • N1: Number of forks along the correct path

    • N2: Number of dead ends

    • L1: Length of the correct path

    • L2: Medium length of incorrect paths apart from the correct path

      • For a even number of incorrect paths, take the average of the medium two

  • Overall difficulty = ((N1 + N2) * (L1 + L2))

  • Tie breaker
    N1 --> N2 --> L1 --> L2 --> Larger serial number is more difficult

 

Input

Output

Sample Input  Download

Sample Output  Download

Tags




Discuss