1: #include 2: #include 3: #include 4: #include 5:
#include 6: using namespace std; 7: 8: #define LL(a) a>1; 32: sub_build(subl,
mid, LL(subidx), idx)...
分类:
其他好文 时间:
2014-05-18 19:43:43
阅读次数:
395
#include #include #include #include #include
using namespace boost; using namespace std; class point {public: point(int
a=0,int b=0):x(a),y(b) {}...
分类:
其他好文 时间:
2014-05-18 19:42:18
阅读次数:
290
//#define LOCAL#include#includeusing namespace
std;int const MAX_N=10005;int const MAX_M=100;int const INF=100000000;int
N,M,x[MAX_N],lb,ub;//判断是否满足条件...
分类:
其他好文 时间:
2014-05-18 19:38:50
阅读次数:
378
先序遍历和中序遍历非递归代码:#include #include using
namespace std;typedef struct BinaryTree { int data; struct BinaryTree *rchild,
*lchild;}BinaryTree;int cr...
分类:
其他好文 时间:
2014-05-17 21:56:50
阅读次数:
264
hash做法:#include#includeconst int Max =
100010;int home[Max],away[Max],hash[Max];int main(){ int n,sum,total; int i,j;
while(scanf("%d",&n)!=E...
分类:
其他好文 时间:
2014-05-17 21:44:37
阅读次数:
504
#include#includechar str[100][100];int com(int
t,int x){ int n,m,i; n=strlen(str[t]); m=strlen(str[x]); n=(n>m)?m:n;
for(i=0;i//我写的#inc...
分类:
其他好文 时间:
2014-05-17 21:28:58
阅读次数:
273
线段树中对一段区间操作的方法----记录增量。详细实现见代码。还要好好体会! 1 //Accepted
6688K 1485MS 2 #include 3 #include 4 #define imax 100005 5 struct node 6 { 7 int
l...
分类:
其他好文 时间:
2014-05-17 21:18:35
阅读次数:
312
1 //Accepted 2384K 1766MS 2 #include 3 #include
4 #define imax 50005 5 struct node 6 { 7 int l,r; 8 int tmax,tmin; 9
}f[3*imax];10 in...
分类:
其他好文 时间:
2014-05-17 21:16:33
阅读次数:
281
对串的基本操作都全已经实现对kmp,kf字符串替换等功能全都已经实现由于时间原因。没来得及注释,希望大家参考见谅。串操作hstring.h头文件实现
//kallen 1 #ifndef _HSTRING_H_ 2 #define _HSTRING_H_ 3 #include 4 class mS....
分类:
编程语言 时间:
2014-05-17 21:07:34
阅读次数:
521
istringstream对象可以绑定一行字符串,然后以空格为分隔符把该行分隔开来。添加头文件
#include 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main()
7 { 8 char...
分类:
其他好文 时间:
2014-05-17 18:13:03
阅读次数:
247