码迷,mamicode.com
首页 >  
搜索关键字:invalid namespace    ( 44721个结果
线段树
感觉线段树一直学的不好,从开始学到现在换了很多风格,模板其实不是问题,关键是还是思路吧。从水题,开始再来一遍。HDU 1166 敌兵步阵#include #include #include #include #include #include #include using namespace std...
分类:其他好文   时间:2014-05-26 14:53:17    阅读次数:320
链表的排序 (选择和冒泡)
无聊写了个单链表排序,不是很难。但是插入写起来很麻烦,都没有,本文全部是将链表中节点值互换,不改变结构,所以很容易写出来 #includeusing namespace std;struct node{ int n; struct node* next;};//创建链表void swap(int &...
分类:其他好文   时间:2014-05-26 14:52:14    阅读次数:227
广度优先搜索
#include#include#include#include#include#include#includeusing namespace std;class node{public: int val; node* left; node* right; node():va...
分类:其他好文   时间:2014-05-26 14:49:14    阅读次数:247
伤心的快排
#includeusing namespace std;///快排,百度数据挖掘,我面到终面///他们部门经理过来面我///数据挖掘的东西,兵来将挡,水来土掩////讲完项目于对互联网的理解///他说,最后写个快排吧~~~~////FUCK,我没写出来////嚓嚓嚓嚓嚓int AdjustArray...
分类:其他好文   时间:2014-05-26 14:14:50    阅读次数:174
Codeforces Round #247 (Div. 2) C. k-Tree (dp)
题目链接题意:思路: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int mo = 1000000000 + 7; 8 int dp[110][110][110]...
分类:其他好文   时间:2014-05-26 14:02:48    阅读次数:264
约瑟夫环 c++ 循环输入
#include#include#include#include using namespace std;template class joseph{ struct node { T data; node * next; node():next(...
分类:编程语言   时间:2014-05-26 13:58:27    阅读次数:215
zoj3675 BFS+状态压缩
#include #include #include using namespace std;int n;int vis[10000000];int mode1,mode2;struct node{ int step,status;};void print(int x){ int tmp...
分类:其他好文   时间:2014-05-26 13:50:43    阅读次数:262
【HDOJ】1983 Kaitou Kid - The Phantom Thief (2)
不仅仅是DFS,还需要考虑可以走到终点。同时,需要进行预处理。至多封闭点数为起点和终点的非墙壁点的最小值。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 ...
分类:其他好文   时间:2014-05-26 13:29:22    阅读次数:286
HAOI2006(BZOJ1050) 旅行comf
Description给你一个无向图,N(N#include#includeconst int N = 510;const int M = 5010;const int Maxint = 2147483647;using namespace std;#define For(i,n) for(int ...
分类:其他好文   时间:2014-05-26 13:09:03    阅读次数:206
C++ Input Output
C++的IO比较复杂,记录一下碰到的问题:#include "stdafx.h"#include using namespace std;int main(int argc, char* argv[]){ cout << 22/5*3 << endl; printf("Hello Wor...
分类:编程语言   时间:2014-05-26 12:42:11    阅读次数:290
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!