码迷,mamicode.com
首页 >  
搜索关键字:turn    ( 27138个结果
1000. The Complex Class
#include<iostream> using namespace std; class Complex //复数类 { public: Complex(double real = 0, double imag = 0); Complex operator+(Complex& com); Comp ...
分类:其他好文   时间:2016-10-22 14:40:08    阅读次数:149
1147. 谁拿了最多奖学金
#include<iostream>using namespace std;int main(){ struct student{ string studentname; int qimograde; int banjigrade; char xuesgb; char xibxs; int lunw ...
分类:其他好文   时间:2016-10-22 14:29:58    阅读次数:171
1013 Digital Roots
#include<iostream>using namespace std;int root(int s){ if(s<10){ return s; } else{ int a=s; int b=0; while(a!=0){ b+=a%10; a=a/10; } root(b); }}int ma ...
分类:其他好文   时间:2016-10-22 14:28:00    阅读次数:155
229. Majority Element II
Given an integer array of size n, find all elements that appear more than ? n/3 ? times. The algorithm should run in linear time and in O(1) space. Hi ...
分类:其他好文   时间:2016-10-22 14:07:12    阅读次数:143
Git是如何存储对象的
原文:http://gitbook.liuhui998.com/7_1.html 一、前言 所有的对象都以SHA值为索引用gzip格式压缩存储, 每个对象都包含了对象类型, 大小和内容. Git中存在两种对象 - 松散对象(loose object)和打包对象(packed object). 二、松 ...
分类:其他好文   时间:2016-10-22 12:11:49    阅读次数:162
javascript实现继承的几种方式
原型链方式实现继承 [javascript] view plain copy print? function SuperType(){ this.property = true; this.colors = ['red','blue','green']; } SuperType.prototype. ...
分类:编程语言   时间:2016-10-22 11:45:42    阅读次数:319
【CSU 1079】树上的查询
http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1079 现有一棵有N个顶点的树,顶点的标号分别为1, 2, …, N。对于每个形如a b k的询问,你需要回答在从点a到点b的路径上是否包含点k。 DFS序&欧拉序列 LCA-最近公共祖先 看完这两篇 ...
分类:其他好文   时间:2016-10-22 11:33:08    阅读次数:237
【Poj 1330】Nearest Common Ancestors
http://poj.org/problem?id=1330 题目意思就是T组树求两点LCA. 这个可以离线DFS(Tarjan) 具体参考 O(Tn) 0ms 还有其他在线O(Tnlogn)也可参考LCA ...
分类:其他好文   时间:2016-10-22 09:44:30    阅读次数:269
BZOJ 3155 Preprefix sum
两个BIT。 ...
分类:其他好文   时间:2016-10-22 09:41:41    阅读次数:183
XDOJ_1083_模拟
http://acm.xidian.edu.cn/problem.php?id=1083 栈,因为只有一种括号,所以只要模拟栈就可以了。 ...
分类:其他好文   时间:2016-10-22 07:53:35    阅读次数:270
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!