题意: 要搭配出来n种颜料,每种颜料要用mi升,除了这n种颜色还有一个合成灰色的毫升数,灰色是由三种不同的颜色合成的,三种m m m 的不同颜色能合成m升灰色,然后问你满足要求至少要多少盒颜色,这个1盒的定义是:一盒里面有n种颜色,每种50ml. 思路: 先把所有的这n中颜色的最小需要合数求出来,然后在处理灰色,处理灰色的时候可以1升1升的合成,每次去当前最大的三个来合成1升,如果最大的三个有0的,那么就再来一盒(也就是一套),千万不要直接把最大的个颜色直接一下用完,要1…
Color the fence 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描述 Tom has fallen in love with Mary. Now Tom wants to show his love and write a number on the fence opposite to Mary’s house. Tom thinks that the larger the numbers is, the more chance to win Mary…
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…
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n grid. In this game a ships are placed on the grid. Each of the ships consists of bconsecutive cells. No cell can be part of two ships, however, the shi…