码迷,mamicode.com
首页 >  
搜索关键字:invalid namespace    ( 44721个结果
hdu-1166-敌兵布阵-线段树-单点更新,区域查询
线段树的单点更新,区域查询操作。 #include #include #include #include #include using namespace std; #define lmin 1 #define rmax n #define lson l,(l+r)/2,rt<<1 #define rson (l+r)/2+1,r,rt<<1|1 #define root lmin,rmax,1...
分类:其他好文   时间:2014-05-26 05:25:50    阅读次数:187
hdu-1540-Tunnel Warfare-线段树
lmax[i]:i区间内,从左往右,连续的最大长度 rmax[i]:i区间内,从右往左,连续的最大长度 val[i]:i区间的长度。 #include #include #include #include #include #include using namespace std; #define INF 99999999 #define lmin 1 #define rmax n #def...
分类:其他好文   时间:2014-05-26 05:25:27    阅读次数:289
图书管理系统 library
#include #include #include #include #include #include using namespace std; void display(int);//输出信息 int size=0; class Book { public: void welcome();//欢迎界面 void welcome1(); void addboo...
分类:其他好文   时间:2014-05-26 04:57:10    阅读次数:344
poj-3264-Balanced Lineup-线段树-区域查询
区域查询操作。 ma[i]:i区间内的最大值 mi[i]:i区间内的最小值 #include #include #include #include #include using namespace std; #define INF 99999999 #define lmin 1 #define rmax n #define lson l,(l+r)/2,rt<<1 #define rson ...
分类:其他好文   时间:2014-05-26 04:11:41    阅读次数:202
[HAOI2010]最长公共子序列
#include #include #include using namespace std; const int m=(int)1E8; string s1,s2; int f[2][5001]={0},g[2][5001]={0}; void init(); void work(); int my_max(int,int); int main() { freopen("lcs.in","r"...
分类:其他好文   时间:2014-05-26 04:07:17    阅读次数:305
hdu-1698-Just a Hook-线段树-区域更新,区域查询
flag[i]:标记i这个区间的值。 val[i]:i这个区间的长度 #include #include #include #include #include using namespace std; #define INF 99999999 #define lmin 1 #define rmax n #define lson l,(l+r)/2,rt<<1 #define rson (l+r...
分类:其他好文   时间:2014-05-26 03:37:19    阅读次数:203
zoj-1610-Count the Colors-线段树-区域更新,单点查询
线段树的区域更新,然后单点查询。 x1 x2 c:区域更新x1-x2为c。 全部染色之后,从0-8000依次查询每个点的颜色。然后存贮每一种颜色有几块。 #include #include #include #include #include using namespace std; #define lmin 0 #define rmax 8000 #define lson l,(l+r)/...
分类:其他好文   时间:2014-05-24 19:10:12    阅读次数:221
ZOJ Problem Set - 1005
注意,条件:B>=C 。应考虑B=C的情况。#includeusing namespace std;int A,B,C;void jugs(int a,int b,int C){ if(b==C) { cout=B) { a=A-(B-b...
分类:其他好文   时间:2014-05-24 09:34:19    阅读次数:288
stack2
#includeusing namespace std;template class Stack{ private: struct Node{ Object data; Node * next; Node(cons...
分类:其他好文   时间:2014-05-24 09:32:25    阅读次数:215
ProjectEuler 004题
1 #include 2 using namespace std; 3 4 int main() { 5 bool isPalindromic (int num); 6 int res = 0; 7 8 for(int i = 100; i res)11 ...
分类:其他好文   时间:2014-05-24 09:26:42    阅读次数:168
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!