and运算符就是所谓的布尔运算符,连接两个布尔值,并且在两者都为真时返回真,否则 返回假,or not 可以随意结合真值短路逻辑 short-circuit logic 惰性求值 lazy evaluation raw_input 返回值为真 断言,条件后可以添加字符串,用来解释断言x = 1Yes...
分类:
编程语言 时间:
2015-12-28 20:10:42
阅读次数:
197
How to Become a Lazy but Productive Android DeveloperHow can we optimize throughput time for writing the business logic for the app and avoid lazy cod...
分类:
移动开发 时间:
2015-12-19 16:17:57
阅读次数:
273
在项目中使用不规则的字符串枚举 出现了问题现采用OC与swift混编的模式提高编写效率class SAMEnumsList:NSObject{ lazy var UpdateAtEnum:[[Int:String]] = { var dict = [[Int:String]]()...
分类:
其他好文 时间:
2015-12-16 17:00:51
阅读次数:
242
构造。对边的权值排序,权值一样的话,在MST中的边排到前面,否则权值小的排在前面。然后边一条一条扫过去,如果是1 ,那么连一个点到集合中,如果是0,集合内的边相连。#include#include#include#includeusing namespace std;const int maxn=1...
分类:
其他好文 时间:
2015-12-15 20:57:22
阅读次数:
132
题意:n点,m条边。m条边里面标记为1的最小生成树的边,0为非最小生成树的边。给了每条边的权,如果能构成一个最小生成树则输出图,否则-1。思路:先按权值小,为生成数边的顺序排序。(根据kruskal)再添加每条0边。这里假定(1,3),(2,4)构成环。 1 #include 2 #include ...
分类:
其他好文 时间:
2015-12-12 12:36:16
阅读次数:
224
Problem DescriptionRecently, Doge got a funny birthday present from his new friend, Protein Tiger from St. Beeze College. No, not cactuses. It's a mys...
分类:
其他好文 时间:
2015-12-11 22:12:00
阅读次数:
244
D. Lazy StudentStudent Vladislav came to his programming exam completely unprepared as usual. He got a question about some strange algorithm on a grap...
分类:
其他好文 时间:
2015-12-11 18:45:19
阅读次数:
162
#include#define REP(i,a,b) for(int i=a;iB.is:A.w>n>>m){ REP(i,1,m) scanf("%d%d",&e[i].w,&e[i].is),e[i].id=i; sort(e+1,e+m+1); int...
分类:
其他好文 时间:
2015-12-10 19:17:55
阅读次数:
139
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1698线段树+lazy操作 线段树是从上到下开始建树,树状数组是从下到上建树....代码: 1 #include 2 #include 3 #include 4 #include 5...
分类:
其他好文 时间:
2015-11-26 21:22:45
阅读次数:
257
spring 配置文件 init-method 就是启动spring缓存时候访问的方法,lazy-init=false/true;false初始化时候加载 true初始化后加载用监听器也可以实现创建监听器类 继承接口servletcontextlisen自动继承两个方法 一个创建 一个销毁在web。...
分类:
数据库 时间:
2015-11-23 11:24:17
阅读次数:
289