描述丽江河边有n家很有特色的客栈,客栈按照其位置顺序从1到n编号。每家客栈都按照某一种色调进行装饰(总共k种,用整数0~ k-1表示),且每家客栈都设有一家咖啡店,每家咖啡店均有各自的最低消费。两位游客一起去丽江旅游,他们喜欢相同的色调,又想尝试两个不同的客栈,因此决定分别住在色调相同的两家客栈中。...
分类:
其他好文 时间:
2015-09-05 15:05:38
阅读次数:
166
题目:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two...
分类:
其他好文 时间:
2015-09-05 15:04:42
阅读次数:
148
http://blog.chinaunix.net/uid-20564848-id-217918.htmlmakefile下$(wildcard $^),$^,$@,$?,$ $@当执行此规则的命令时,自动环变量“$*”被展开为“茎” 在这里就是。“big” “little”和。静态模式规则对一个较...
分类:
其他好文 时间:
2015-09-05 15:04:44
阅读次数:
207
题意:裸最小生成树,主要是要按照字典序。注意sort排序是不稳定排序,那么cmp中的w相同时怎么排要指出。思路:模板prim:kruskal:#include#include#include#includeusing namespace std;#define MAXN 110//最大点数#defi...
分类:
其他好文 时间:
2015-09-05 15:02:54
阅读次数:
233
好久没有写点什么了,一是懒,二是觉得自己是无病呻吟,自己貌似觉得呻吟得挺得意,但别人看了估计就恶心得不行了。很多人都会说,不是不想写,是实在没啥可写的。其实,这都是给自己找借口,就像是很多人都说过,我就是这样的性格,改不了类似的话,纯属扯淡,是压根没想真正去改变。再是,经历多了,阅历多了,文字...
分类:
其他好文 时间:
2015-09-05 15:01:28
阅读次数:
164
Populating Next Right Pointers in Each Node IIFollow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any ...
分类:
其他好文 时间:
2015-09-05 15:02:36
阅读次数:
145
4.7.5 Efficient Construction of LALR Parsing TablesThere are several modifications we can make to Algorithm 4.59 to avoid constructing the full collec...
分类:
其他好文 时间:
2015-09-05 15:01:59
阅读次数:
184
对于特殊的字符串,我们对字符串进行特殊与非特殊两种,第一种字符串开头特殊字符提到末尾处理方法或者末尾字符串提到开头,总之先处理特殊的就OK了开头提到末尾处理:#include "stdio.h"#include"stdlib.h"#include "conio.h"void fun(char*a){...
分类:
其他好文 时间:
2015-09-05 15:00:58
阅读次数:
151
这是2015年最后一场多校的dp题,当时只怪自己基础太差,想了1个多小时才想出来,哎,9月份好好巩固基础,为区域赛做准备。题目传送门题目的意思是给你n元钱,m类糖果,每类糖果分别有p, a, b, p表示单价,假设付了w*p元,那么他能获得a*w + b个糖果。求最大的糖果数。当时一看到这题,觉得是...
分类:
其他好文 时间:
2015-09-05 15:01:08
阅读次数:
185
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1162Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8...
分类:
其他好文 时间:
2015-09-05 15:03:50
阅读次数:
183
xml样本01 1 857544544 54 54 2 858544544 63 63 3 454854555 781 781 xml样本02 1000100001 20081130 30000101 20081130 1000100...
分类:
其他好文 时间:
2015-09-05 15:02:41
阅读次数:
149
IOS 序列化与反序列化摘自:http://hi.baidu.com/popln/blog/item/c3dd9302bb37e994d43f7ccb.html开篇1到底这个序列化有啥作用?面向对象的程序在运行的时候会创建一个复杂的对象图,经常要以二进制的方法序列化这个对象图,这个过程叫做Archi...
分类:
其他好文 时间:
2015-09-05 14:59:58
阅读次数:
157
1 struct Splay{ 2 struct obj{ 3 int s,v,cnt; 4 obj*f,*c[2]; 5 obj(int _v=0,int _cnt=0,obj*_f=null): 6 v...
分类:
其他好文 时间:
2015-09-05 14:59:28
阅读次数:
184
1076. Forwards on Weibo (30)时间限制3000 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueWeibo is known as the Chinese version of Twitter. One user on W...
分类:
其他好文 时间:
2015-09-05 14:58:39
阅读次数:
182
一.原理图二. 实物图三.完整事例代码
分类:
其他好文 时间:
2015-09-05 14:59:10
阅读次数:
214
http://www.cnblogs.com/stonehat/archive/2011/10/14/2212141.htmlhttp://m.blog.csdn.net/blog/u010086298/37777607先看两个例子#include int main(int argc, char *...
分类:
其他好文 时间:
2015-09-05 14:57:52
阅读次数:
170
1、【官方文档】在tomcat\conf下server.xml中找到在其中添加:这的docBase要改成你的项目目录。2、 不修改server.xml【推荐使用此方法】在tomcat文件夹的conf"catalina"localhost(对于Tomcat6版本及其以上,需要自己创建catalina和...
分类:
其他好文 时间:
2015-09-05 14:59:12
阅读次数:
167