码迷,mamicode.com
首页 >  
搜索关键字:const    ( 26295个结果
hust 1625 Chessboard
题目描述Given an N*N(N#include#include#includeusing namespace std;const int maxn=1001;int group[maxn][maxn];bool vis[maxn][maxn];int dx[4]={0,0,1,-1};int ...
分类:其他好文   时间:2014-05-19 09:06:30    阅读次数:379
gcc支持的标签
#include #include int main(/*int argc, char const *argv[]*/){ void * target; time_t now = time(NULL); if(now & 1) target = &&odd; else target = &&e...
分类:其他好文   时间:2014-05-18 20:27:53    阅读次数:306
二分搜索的运用(1最大化最小值)
//#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
并查集
int const MAX_N=100000;int par[MAX_N];//父亲int rank[MAX_N];//树的高度//初始化n个元素void init(int n){ for(int i=0;i#includeint const MAX_N=100000;int const MA...
分类:其他好文   时间:2014-05-18 19:20:37    阅读次数:278
二分查找 变形
#includeint solver(const int a[],const int n,const int t){ int total = 0; if (NULL == a && 0 >= n) return total; int start = 0; int end = n-1...
分类:其他好文   时间:2014-05-18 18:51:03    阅读次数:175
二分查找法
#includeint BinarySearch(const int a[],const int t,int lengh) ///暂时没错的版本,注意middle最好不要直接赋值,因为那样如果找不到,会引起死循环{ printf("%d",sizeof(a));///放到这里输出为4 int s.....
分类:其他好文   时间:2014-05-18 02:45:12    阅读次数:233
复制构造函数 与 赋值函数 的区别
构造函数、析构函数、赋值函数是每个类最基本的的函数。每个类只有一个析构函数和一个赋值函数。但是有很多构造函数(一个为复制构造函数,其他为普通构造函数。对于一个类A,如果不编写上述四个函数,c++编译器将自动为A产生四个默认的函数,即:A(void) //默认无参数构造函数A(const A &a) ...
分类:其他好文   时间:2014-05-18 00:49:10    阅读次数:246
C++ PRIMER 第九章
顺序容器:vector list deque顺序容器适配器: stack queue priority_quequ(没见过,第一轮不管)C c; C c(c2); C c(b,e) ///b e 都是迭代器; c(n,t)///只用于顺序容器; C c(n) ///只用于顺序容器const list...
分类:编程语言   时间:2014-05-17 23:43:37    阅读次数:471
hdu1166敌兵布阵
1 //Accepted 250MS 2480K 2 #include 3 #include 4 const int MAXN = 50005; 5 struct node 6 { 7 int l,r; 8 int add,sum; 9 }f[3*MAXN];10 int n;...
分类:其他好文   时间:2014-05-17 20:36:37    阅读次数:316
C++共享数据的保护
共享数据的保护:常类型 常类型的对象必须初始化,且这个值不能被更新常引用:被引用的对象不能更新 const 类型说明符 & 引用名常对象:必须进行初始化,不能更新 类名 const 对象名常数组:数组元素不能更新 类型说明符 const 数组名[大小]常指针:指向常量的指针
分类:编程语言   时间:2014-05-17 18:34:51    阅读次数:215
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!