码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
【USACO】Wormholes(暴力搜索)
直接按照题意暴力就行 /* ID: 18906421 LANG: C++ PROG: wormhole */ #include #include #include #include #include using namespace std; typedef long long LL; const int maxn = 15; LL v[maxn]; int next[maxn],connect[...
分类:其他好文   时间:2015-04-13 22:56:49    阅读次数:138
hdu 1495
典型的最短步骤求解问题#include#include#include#includeusing namespace std;struct node{ int a,b,c,n;};bool v[103][103][103];void bfs(int a,int b,int c){ me...
分类:其他好文   时间:2015-04-13 22:47:54    阅读次数:120
hdu 2612
题意:给图如下4 4Y.#@.....#..@..MY M 分别是两个人他们要选一个@见面 问他们最小的见面时间(见面时间为两人到达时间的和)分析 :典型的广搜题目#include#include#include#includeusing namespace std;struct node{ ...
分类:其他好文   时间:2015-04-13 22:44:05    阅读次数:222
hihoCoder#1086 Browser Caching
原题地址list+map可以轻松搞定,如果不借助STL实现起来还是挺麻烦的代码: 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 int N, M; 9 map::iterator> rec...
分类:其他好文   时间:2015-04-13 22:40:15    阅读次数:172
hdu 1241
题意 :求一块区域内有多少油田简单dfs#includeusing namespace std;char map[102][102];int use[102][102];int m,n;int dir[8][2]={{1,0},{-1,0},{0,1},{0,-1},{1,1},{1,-1},{-1...
分类:其他好文   时间:2015-04-13 22:37:49    阅读次数:134
toj 2196 优先队列和堆的用法
很简单的优先队列或者堆的使用。 1 #include 2 #include 3 using namespace std; 4 5 //greater对int来说表示值越小优先级越高,也可以自己定义比较函数 6 priority_queue, greater > q; 7 char op[2];...
分类:其他好文   时间:2015-04-13 22:28:58    阅读次数:143
poj 1426
题意 : 给定一个n求只包括0与1的数 能被n整除 任意一个答案就可以#include#include#include#include using namespace std; #define CLR(arr,val) memset(arr,val,sizeof(arr)) typedef lo.....
分类:其他好文   时间:2015-04-13 22:27:09    阅读次数:127
每天一点C语言
example1: 1 #include 2 #include 3 using namespace std; 4 5 int main () 6 { 7 unsigned int a = 998; 8 int b = -1; 9 if ( a b )14 {1...
分类:编程语言   时间:2015-04-13 22:18:28    阅读次数:138
15th浙大校赛 zoj3860-3868
比赛链接:here题目对应到ZOJ3860~3868AFind the Spy水#include#include#include#includeusing namespace std;mapmp;map::iterator it;int main(){ int T,n,x; scanf(...
分类:其他好文   时间:2015-04-13 22:16:52    阅读次数:173
*p++的问题
今天看到《C++Primer》上写*p++等价于先运算p++然后再进行解引用计算,想了一会儿,又去网上查了查,不过发现说法不一,还有争论得不可开交的... 于是,本人默默的打开了VS... 还是亲测一下最好 #include "stdafx.h" #include using namespace std; int _tmain(int argc, _TCHAR* argv[]) { ...
分类:其他好文   时间:2015-04-13 20:56:32    阅读次数:123
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!