简单的拓扑排序。#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
题意:给定两个空桶的容量分别为A、B,经过6种操作使获得C升水,求最少操作数;思路:广搜。最少操作数很简单,练习一下打印路径;打印最短路劲就是每次记录当前状态和上一步,找到终点后查找路径。#include#include#includeusing namespace std;#define INF ...
分类:
其他好文 时间:
2015-04-18 14:20:17
阅读次数:
136
#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
首先发现一个很头痛的问题,下面是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
#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
写在前面最近一直在研究sharepoint的文档库,在上传文件到文档库的过程中,需要模拟post请求,也查找了几种模拟方式,webclient算是比较简单的方式。一个例子这里写一个简单接受post请求的aspx页面,代码如下: 1 namespace Wolfy.UploadDemo 2 { 3 ....
分类:
Web程序 时间:
2015-04-18 11:19:27
阅读次数:
149
差分约束模板题,差分约束是判断联立不等式组是否有解的一种方法,建图是关键。
代码:
//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
友情题目链接: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定理,求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