#P9106. If You Can’t Beat Them, Join Them!

If You Can’t Beat Them, Join Them!

Source: Super League of Chinese College Students Algorithm Design 2022, Contest 9 by NJU.