当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。
2 2 QE EA 3 1 QAE 3 1 AQE 5 5 ..E.. .###. A###Q .###. ..E.. 5 1 A.E.Q 5 5 A.... ####. ..E.. .#### ....Q
Queen can not escape and Army can not catch Queen. Army can catch Queen. Queen can escape. Queen can not escape and Army can not catch Queen. Army can catch Queen. Army can catch Queen.
On the first sample input, the queen can move to exit cells, but either way the queen will be caught at the next army’s turn. So the optimal strategy for the queen is staying at the same cell. Then the army can move to exit cells as well, but again either way the army will miss the queen from the other exit. So the optimal strategy for the army is also staying at the same cell. Thus the queen cannot escape but won’t be caught.
Recommend | zhouzeyong |
时间上限 | 内存上限 |
10000/5000MS(Java/Others) | 131072/65536K(Java/Others) |