1、使用画刷将整个界面初始化为黑色 wndclass.hbrBackground = CreateSolidBrush(0); 2、WM_CREATE创建窗口的时候 注意,在hwndRect的创建风格时候使用SS_WHITERECT 在msdn上面的描述是这样的: Specifies a recta ...
Description A color reduction is a mapping from a set of discrete colors to a smaller one. The solution to this problem requires that you perform just ...
分类:
其他好文 时间:
2016-04-05 15:30:28
阅读次数:
275
There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a certai ...
分类:
其他好文 时间:
2016-04-03 14:30:51
阅读次数:
149
题目大意:Codeforces 444C DZY Loves Colors 题目大意:两种操作,1是改动区间上l到r上面德值为x,2是询问l到r区间总的改动值。 解题思路:线段树模板题。 #include <cstdio> #include <cstring> #include <cstdlib> ...
分类:
其他好文 时间:
2016-04-01 09:08:14
阅读次数:
230
这道题磨磨唧唧好久 维持两个pointer,一个指向最后一个0的下一位,一个指向最后一个1的下一位,然后如果碰到0,就把两个指针一起往后移一格,如果是1,就把指向1那个指针往后移一格。 代码+思路依旧来自code ganker大神 ref:http://blog.csdn.net/linhuanma ...
分类:
其他好文 时间:
2016-03-31 07:08:41
阅读次数:
130
《c# wpf 游戏笔记一 画布实例DispatcherTimer》 Rectangle rect; //创建一个方块作为演示对象 rect = new Rectangle(); rect.Fill = new SolidColorBrush(Colors.Red); //设置画布canvas的背景 ...
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1610 Description Painting some colored segments on a line, some previously painted ...
分类:
其他好文 时间:
2016-03-30 14:39:29
阅读次数:
266
编辑器设置1、设置代码的字体类型和大小 Window -> Preferences -> General -> Appearance -> Content Assist -> Colors and Fornts,只需修改 Basic 里面的 Text Font 就可以了2、设置快捷键 windows... ...
分类:
系统相关 时间:
2016-03-29 20:59:22
阅读次数:
278
题目链接:https://leetcode.com/problems/sort-colors/
题目:Given an array with n objects
colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order r...
分类:
其他好文 时间:
2016-03-28 00:08:14
阅读次数:
190