卡随机数的 hack 我还是第一次见。
hack
C++ 用 rand() 函数无论设置什么种子都会在 #6 被卡住,所以必须手写随机数或者使用 rand() * rand() % n。
rand()
#6
rand() * rand() % n