一种比较暴力的解法是,猜想答案串主要有两种循环节组成。每一个循环节一定形如 $x$ 个 w 和 $y$ 个 s,其中 $x, y \leq 3$。枚举这两个循环节,以及余数部分,再求解循环节的线性组合使得使用的数量正好为给定的值即可。
QOJ.ac
QOJ
The 3rd Universal Cup Finals is coming! Join our Warm-up Game and Prediction Game and win the prizes! Learn more...
Discussion #1342 for Problem #17420. Birds-of-Paradise' Card Game
Type: Editorial
Status: Open
Posted by: Milmon
Posted at: 2026-03-29 19:49:39
Last updated: 2026-03-29 19:49:45
题解
Comments
No comments yet.