#P2099. [NOI2007] 调兵遣将
[NOI2007] 调兵遣将
Output Format
The first line of each output file contains the time your solution takes.
Then output lines. In order, output each command. Each line contains integers , indicating moving the squad located at to .
5 5
..##.
#...#
#OOO#
#..O#
.###.
1
2 1 2 2
Hint
If the contestant’s output plan is invalid (overlapping squads during execution, squads moving out of the rectangular boundary, squads occupying research regions in the final plan, research regions not surrounded, etc.), the score is zero.
Otherwise, let the time spent by the contestant’s plan be , and the score is computed as follows:
$$score= \begin{cases} \ 10&ans \leq A_i\\ \ 1+\left\lfloor\dfrac{ans-B_i}{A_i-B_i}\right\rfloor \times 9&A_i<ans \leq B_i\\ \ 1&B_i<ans\\ \end{cases}$$For each dataset, there are two scoring parameters and , with guaranteed.
Translated by ChatGPT 5
京公网安备 11011102002149号