依次进行 $1$ 次 $+$,$3$ 次 $-$,$9$ 次 $+$ ……,就能在不超过 $18m$ 次询问内走到 $0$(最大值仅在 $m=2$ 时取到),然后再做 $+$ 和 $-$ 各一次,如果仍在 $0$ 则为 Ugly,否则根据 $+$ 和 $-$ 次数的多少可以判断是 Good 还是 Bad。
QOJ.ac
QOJ
Discussion #358 for Problem #12310. The Good, the Bad and the Ugly
Type: Editorial
Status: Open
Posted by: jiangly
Posted at: 2025-12-14 07:17:12
Last updated: 2025-12-14 07:17:17
题解
Comments
No comments yet.