1 #include 2 #include 3 #include 4 #include 5 const int maxn=1001; 6 using namespace std; 7 int n; 8 int d; 9 double max_x,min_x; 10 struc...
分类:
其他好文 时间:
2015-10-14 21:30:50
阅读次数:
169
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.IO;using System.Web;namespace WebAPICl...
对于c++的内存泄露检测,除了我们自己手动检查以外,还可以使用c++中的函数来帮助我们检测, 如下代码: #include "stdafx.h" #include #include #include using namespace std; int main() { char *p=new char...
分类:
编程语言 时间:
2015-10-14 19:28:27
阅读次数:
227
题目大意:给定一个n个点n-1条的连通无向图,求从任意一点出发,在不重复经过同一点的情况下,所能走过的的边的最大权值。解题思路:深度优先搜索。 1 #include 2 #include 3 using namespace std; 4 5 struct Edge { 6 int to...
分类:
其他好文 时间:
2015-10-14 14:09:49
阅读次数:
159
了解一下BinaryReader 和BinaryWirte基元类型:using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;namespace ConsoleA...
分类:
其他好文 时间:
2015-10-14 13:55:18
阅读次数:
105
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace FZJ.Lock{ /// /// 等值锁定 //...
题目: 一直树的前序遍历和中序遍历,求后序遍历。分析: 递归.对于每个子树,前根序第一个是根,找到它在中根序的位置,就能确定左右子树,然后递归求解。代码: #include #include #include #include using namespace std;char tq[27],t...
分类:
其他好文 时间:
2015-10-14 11:55:33
阅读次数:
144
vijosP1388 二叉树数链接:https://vijos.org/p/1388【思路】 Catalan数。根据公式h=C(2n,n)/(n+1)计算。首先化简为 (n+i)/i的积(1 2 #include 3 using namespace std; 4 5 struct Bign { 6....
分类:
其他好文 时间:
2015-10-14 10:23:50
阅读次数:
174
1#include#include#includeusing namespace std;int main(){ double k,p,n; while(~scanf("%lf%lf",&n,&p)) { k=pow(p,1/n); printf("%....
分类:
其他好文 时间:
2015-10-14 09:02:48
阅读次数:
120
#include#include#include#include#include#includeusing namespace std;struct node{ char s[60]; int v; int flag; int cou;}a[300];bool cmp(nod...
分类:
其他好文 时间:
2015-10-14 00:09:34
阅读次数:
157