the problem is UVa 11157 — lazy frog
i understand that the subproblem is to find the minimax jump between two closest big stones. but how to prove that alternating jumps on the small stones is the best strategy ?
# | User | Rating |
---|---|---|
1 | tourist | 3857 |
2 | jiangly | 3747 |
3 | orzdevinwang | 3706 |
4 | jqdai0815 | 3682 |
5 | ksun48 | 3591 |
6 | gamegame | 3477 |
7 | Benq | 3468 |
8 | Radewoosh | 3463 |
9 | ecnerwala | 3451 |
10 | heuristica | 3431 |
# | User | Contrib. |
---|---|---|
1 | cry | 166 |
2 | -is-this-fft- | 161 |
3 | Qingyu | 160 |
4 | Dominater069 | 159 |
5 | atcoder_official | 157 |
6 | adamant | 155 |
7 | Um_nik | 152 |
8 | djm03178 | 151 |
9 | luogu_official | 150 |
10 | awoo | 148 |
the problem is UVa 11157 — lazy frog
i understand that the subproblem is to find the minimax jump between two closest big stones. but how to prove that alternating jumps on the small stones is the best strategy ?
Name |
---|
Let us prove this by contradiction. Let this not be the optimal strategy and the maximum jump is Mi - 1 → Mi + 1. Using optimal solution frog will jump:
Mi - 1 → Mi
frog must jump Mi - 2 → Mi + 1 — greater distance than Mi - 1 → Mi + 1;
Mi → Mi + 1
frog must jump Mi - 1 → Mi + 2 — greater distance than Mi - 1 → Mi + 1.
We got a contradiction, so your greedy is correct.