题意: 要搭配出来n种颜料,每种颜料要用mi升,除了这n种颜色还有一个合成灰色的毫升数,灰色是由三种不同的颜色合成的,三种m m m 的不同颜色能合成m升灰色,然后问你满足要求至少要多少盒颜色,这个1盒的定义是:一盒里面有n种颜色,每种50ml. 思路: 先把所有的这n中颜色的最小需要合数求出来,然后在处理灰色,处理灰色的时候可以1升1升的合成,每次去当前最大的三个来合成1升,如果最大的三个有0的,那么就再来一盒(也就是一套),千万不要直接把最大的个颜色直接一下用完,要1…
Painter's Problem 题意:给一个n*n(1 <= n <= 15)具有初始颜色(颜色只有yellow&white两种,即01矩阵)的square染色,每次对一个方格染成黄色时,同时会把周围的方格也染成黄色.(这和1222的开关一样的关联关系)问最后可以将square全部染成黄色的最小染色方格数? 思路: 1.直接预处理出增广矩阵,和1222不同的是里面有最优解的条件,贪心的思想是把自由变元看成是没染色的,但是其他非自由变元(除去自由维度之外的变量)是可以通过自由变元的取…
Painter Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 3157 Accepted: 1962 Description The local toy store sells small fingerpainting kits with between three and twelve 50ml bottles of paint, each a different color. The paints are bri…
Painter Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5621 Accepted: 3228 Description The local toy store sells small fingerpainting kits with between three and twelve 50ml bottles of paint, each a different color. The paints are bri…
Wooden Sticks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 15564 Accepted Submission(s): 6405 Problem Description There is a pile of n wooden sticks. The length and weight of each stick a…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 56784 Accepted Submission(s): 19009 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…