码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
hdu 3342 Legal or Not
简单的拓扑排序。#include#include#include#include#includeusing namespace std;int rudu[105];vectorabc[105];int main(){ int n, m, i, x, y, j, k; while (~sc...
分类:其他好文   时间:2015-04-18 14:25:04    阅读次数:106
POJ 3414 Pots(bfs打印路径)
题意:给定两个空桶的容量分别为A、B,经过6种操作使获得C升水,求最少操作数;思路:广搜。最少操作数很简单,练习一下打印路径;打印最短路劲就是每次记录当前状态和上一步,找到终点后查找路径。#include#include#includeusing namespace std;#define INF ...
分类:其他好文   时间:2015-04-18 14:20:17    阅读次数:136
exec函数簇的使用
#include #include using namespace std; int main(int argc,char *argv[]) { execl("/bin/ls","-l",NULL);//1 execv("/bin/ls",&argv[1]);//2 execle("/bin/ls","-l",(char *)0,NULL);//3 execve("/bin...
分类:其他好文   时间:2015-04-18 13:11:21    阅读次数:117
hdu 4248 A Famous Stone Collector
首先发现一个很头痛的问题,下面是2个求排列组合的代码1 memset(C,0,sizeof(C));2 for(int i=0;i 2 #include 3 #include 4 #define MOD 1000000007 5 using namespace std; 6 typedef...
分类:其他好文   时间:2015-04-18 12:58:22    阅读次数:130
虚基类构造函数执行顺序
#include using namespace std;class stream{public: stream(){cout<<"stream constructer"<<endl; ~stream(){cout<<"stream destructer"<<endl;};class iistr.....
分类:其他好文   时间:2015-04-18 12:46:06    阅读次数:120
C++内存检测(定位到确定地址,并且用hash表来保存提高了搜索效率)
#include #include #include #include #define DefaultSize 7 using namespace std; struct Node { char *pname;//文件名字 int line;//行号 int size;//大小 long long save;//存储地址ip Node *next; }; struct Hash...
分类:编程语言   时间:2015-04-18 11:37:35    阅读次数:188
通过WebClient模拟post上传文件到服务器
写在前面最近一直在研究sharepoint的文档库,在上传文件到文档库的过程中,需要模拟post请求,也查找了几种模拟方式,webclient算是比较简单的方式。一个例子这里写一个简单接受post请求的aspx页面,代码如下: 1 namespace Wolfy.UploadDemo 2 { 3 ....
分类:Web程序   时间:2015-04-18 11:19:27    阅读次数:149
poj 1275 Cashier Employment 差分约束
差分约束模板题,差分约束是判断联立不等式组是否有解的一种方法,建图是关键。 代码: //poj 1275 //sep9 #include #include using namespace std; const int maxM=10024; const int maxN=32; struct Edge { int v,w,nxt; }edge[maxM]; int t[maxN],c...
分类:其他好文   时间:2015-04-18 08:53:47    阅读次数:113
hdoj-1247-Hat’s Words-字典树
友情题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1247 #include #include #include #include using namespace std; const int N=30; const int MAX=50005; char word[MAX][30]; struct node { bool temp; no...
分类:其他好文   时间:2015-04-18 08:52:58    阅读次数:148
Morley’s Theorem(几何+UVA11178)
题意:Morley定理,求D、E、F的坐标 思路:没什么算法,就是几何的应用。注意旋转角就好了。 转载请注明出处:寻找&星空の孩子  题目链接:UVA11178     #include #include #define PI acos(-1.0) using namespace std; struct Point { double x,y; Point(double...
分类:其他好文   时间:2015-04-18 08:48:29    阅读次数:125
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!