码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
C++ 操作符函数
Point.h /*  * Point.h  *  *  Created on: 2014年5月22日  *      Author: John  */ #include using namespace std; #ifndef POINT_H_ #define POINT_H_ class Point { private: int x; int y; ...
分类:编程语言   时间:2014-05-26 03:19:07    阅读次数:399
uva11461Square Numbers
简单数论题。区间减法。 1 //Accepted 0 KB 9 ms 2 #include 3 #include 4 using namespace std; 5 const int MAXN = 100005; 6 int f[MAXN]; 7 void pre() 8 { 9 ...
分类:其他好文   时间:2014-05-26 02:54:57    阅读次数:278
Queue1
1 #include 2 using namespace std; 3 //#define maxSize 20 4 template 5 class Queue 6 { 7 private : 8 // T data[maxSize]; 9 int maxSize;10 ...
分类:其他好文   时间:2014-05-26 02:50:09    阅读次数:267
第九周编程作业
A:list总时间限制:4000ms内存限制:65536kB描写叙述写一个程序完毕下面命令:new id ——新建一个指定编号为id的序列(id#include #include #include using namespace std;typedef map > Map;int main(){ i...
分类:其他好文   时间:2014-05-26 02:26:51    阅读次数:337
poj 2965
题意 : 4*4的+,-组成 每次能翻转一个点所在的行与列 求最小的翻转次数 使得矩阵全为-思路:暴力枚举#includeusing namespace std;int map[5][5];int b;int n;int rsult[22];void slip(int i,int s[][4])//...
分类:其他好文   时间:2014-05-26 02:20:04    阅读次数:320
Queue2
1 #include 2 using namespace std; 3 template 4 class Queue 5 { 6 private: 7 struct node 8 { 9 T data;10 node * next;11 ...
分类:其他好文   时间:2014-05-26 02:19:36    阅读次数:213
线段交点模版
http://acm.hdu.edu.cn/showproblem.php?pid=1086跨立实验算法#include#include#include#includeusing namespace std;struct Point{ double x,y;} ;struct Line{ ...
分类:其他好文   时间:2014-05-26 02:10:52    阅读次数:224
HDU 1847 博弈
sg[0]=0;sg[i]=mex{sg[i-2^(j)]} (i>=2^j)mex()为不在此集合的最小非负整数#include #include #include #include using namespace std;using namespace std;int main(){ in...
分类:其他好文   时间:2014-05-25 03:27:01    阅读次数:170
UVA 11624 UVA 10047 两道用 BFS进行最短路搜索的题
很少用bfs进行最短路搜索,实际BFS有时候挺方便得,省去了建图以及复杂度也降低了O(N*M);UVA 11624 写的比较挫#include #include #include #include using namespace std;struct node{ int ft; int ...
分类:其他好文   时间:2014-05-25 03:23:54    阅读次数:210
POJ - 1077 Eight
题意:经典八数码问题 思路:HASH+BFS#include #include #include #include using namespace std; const int MAXN = 500000; const int size = 1000003; typedef int State[9]; char str[30]; int state[9],goal[9]={1, 2, ...
分类:其他好文   时间:2014-05-24 21:46:23    阅读次数:359
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!