题意:给一个由0,1组成的序列,有两种操作,一种是翻转给定区间的数(0->1,1->0),另一种是查询给定区间内由1组成的子串的最大长度。重点在区间合并和延迟标记。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define INF 0x3fffffff
usi...
分类:
其他好文 时间:
2015-09-01 10:46:35
阅读次数:
184
Lambert光照模型,根据光照向量与顶点发现的夹角来确定光照强度:Shader "James/VP Shader/LightModel-Lambert" { Properties { _MainTex ("MainTex", 2D) = "white" {} } ...
分类:
其他好文 时间:
2015-08-31 19:10:49
阅读次数:
251
大家应该都知道用text-overflow:ellipsis属性来实现单行文本的溢出显示省略号(…)。当然部分浏览器还需要加宽度width属性。overflow: hidden;text-overflow: ellipsis;white-space: nowrap;但是这个属性并不支持多行文本溢出显...
分类:
其他好文 时间:
2015-08-31 19:04:29
阅读次数:
187
选中文本时的字体颜色::selection { color: white; background: #0aa284;}去掉chrome记住密码后自动填充表单的黄色背景input:-webkit-autofill {-webkit-box-shadow:0 0 0px 1000px white ins...
分类:
其他好文 时间:
2015-08-31 17:05:46
阅读次数:
202
Dance Dance RevolutionTime Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusPracticeUVA 1291Mr. White, a fat man, now is crazy about...
分类:
其他好文 时间:
2015-08-30 21:15:04
阅读次数:
159
enum Color
{
Black,White,Red,Yellow,Green
}
boolean paintFill(Color[][] screen,int x,int y,Color ocolor,Color ncolor)
{
if(x=screen[0].length||y=screen.length)
{
return false;
}
if(screen[y]...
分类:
其他好文 时间:
2015-08-29 23:22:15
阅读次数:
216
Delphi编程中资源文件的应用/转自http://chamlly.spaces.live.com/blog/cns!548f73d8734d3acb!236.entry一、引子:现在的Windows应用程序几乎都使用图标、图片、光标、声音等,我们称它们为资源(Resource)。最简单的使用资源的...
word-wrap: normal; || word-break: normal;当word-wrap或者word-break为normal时,也就是浏览器的默认设置时。换行规则是这样的: 情景一: 当一个单词在行尾不能完整容纳时,会自动将这个单词换到下一行,示例如下。 ...
分类:
其他好文 时间:
2015-08-29 13:53:43
阅读次数:
332
Broken NecklaceYou have a necklace of N red, white, or blue beads (3#include using namespace std;const int maxn=355;int N;char beads[maxn];int calcula...
分类:
其他好文 时间:
2015-08-29 06:07:57
阅读次数:
191
Appleman has a tree withnvertices. Some of the vertices (at least one) are colored black and other vertices are colored white.Consider a set consistin...
分类:
移动开发 时间:
2015-08-28 19:31:43
阅读次数:
252