题意 一个h*w的矩阵上面涂k种颜色,并且每行相邻格子.每列相邻格子都有=或者!=的约束.要求构造一种涂色方案使得至少有3/4的条件满足. 思路 脑补神题--自己肯定想不出来T_T-- 官方题解: 297D - Color the Carpet This is my favorite problem in the contest :) For k = 1 there is only one coloring so we just need to check the number of "E&qu…
题意 Split a unique array into two almost unique arrays. unique arrays指数组各个数均不相同,almost unique arrays指可以删掉数后再判断. 思路 略神的数学构造题... 官方题解: An equivalent definition for almost unique, is arrays with at least ⌊ 2n / 3⌋ different elements. The idea is to split…