09 2017 档案
摘要:01-复杂度2 Maximum Subsequence Sum(25 分) Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni,
阅读全文
摘要:1、创建新的文件夹: 快捷键C+V+T打开终端,mkdir test. 2、g++编译的命令: g++ test.cpp -o test(没有-o 默认为a.out) ./ test 3.运行安装后的软件,然后锁住 /usr/bin/google-chrome-stable
阅读全文
posted @ 2017-09-24 20:35
code666
摘要:#include<iostream>#include<algorithm>#include<math.h>#include<stdio.h>#include<iomanip> //保留两位小数用到的using namespace std;const int N=101;int Tree[N];int
阅读全文
摘要:某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N
阅读全文
摘要:某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城
阅读全文
摘要:#include<iostream>using namespace std;int main(){ char s1[11]; char s2[11]; while (cin >> s1 >> s2) { int ans = 0; for (int i = 0; s1[i] != 0; i++) //
阅读全文
摘要:进行中序排序,结果是递增序列, 前序排序,跟输入一样 #include<iostream>using namespace std; struct Node //二叉树结构体{ Node*lchild; Node*rchild; int c; //保存数字} Tree[110]; //静态数组 int
阅读全文
摘要:参考:http://blog.csdn.net/u010607031/article/details/37578957 //#include<stdio.h>#include<string.h>#include<iostream>using namespace std;const int N = 2
阅读全文
摘要:1排序(调用 sort) 默认升序 降序: #include<iostream>#include<algorithm>using namespace std;bool cmp(int x, int y) //定义降序排序规则{ return x > y;}int main(){ int n; cin
阅读全文
摘要:N个数进栈,出栈序列有多少个?这个问题属于卡特兰数(h(n)=C(2n,n)/(n+1) (n=1,2,3,...))的应用某系统中有3个并发进程,都需要同类资源4个,试问该系统保证不会发生死锁的最少资源数是______。A.9个B.10个C.4个D.12个3*3+1
阅读全文
摘要:http://blog.csdn.net/red_stone1/article/details/73526457
阅读全文

浙公网安备 33010602011771号