设逆序对个数为 $I$,显然其数量一直在减少,最终变为 $0$。注意到翻转 $\texttt{10}$ 会让 $I$ 减少 $1$,其余操作会让 $I$ 减少 $2$,且只要 $I\ge 2$,就一定存在一种操作让 $I$ 减少 $2$。因此先手必胜当且仅当 $I\not\equiv 0\mod 3$。
QOJ.ac
QOJ
Discussion #316 for Problem #1644. Reverse Game
Type: Editorial
Status: Open
Posted by: jiangly
Posted at: 2025-12-14 07:03:23
Last updated: 2025-12-14 07:03:28
题解
Comments
No comments yet.