- 博客(11)
- 资源 (13)
- 问答 (7)
- 收藏
- 关注
原创 深度优先搜索和广度优先搜索
//DFS#include #include #include using namespace std;vector > V; //邻接表vector visit;int n;//点数int m;//边数vector ans;void dfs(int n){ ans.push_back(n); visit[n] = 1; for(int j=0;j<V[
2016-11-29 15:54:22 238
原创 USACO Transformations
/*ID:fan19132LANG:C++TASK:transform*/#include"iostream"#include"stdio.h"#include"stdlib.h"#include"string.h"int n;char a[11][11],b[11][11],c[11][11];intcheck(){ for(int i=0;i<n;i++){
2016-11-24 13:50:16 261
原创 USACO Milking Cows
题意:给定一个n然后给出n个区间然后求出最大连续区间长度和最大不连续空间长度/*ID: 19132PROG: milk2LANG: C++*/#include"iostream"#include"stdio.h"#include"string.h"int Max(int a,int b){ return a>b?a:b;}int Min(int a,in
2016-11-21 20:47:00 709
原创 USACO Broken Necklace
题意: 输入n 输入一个长度为n的字符串 把它看成一个环 然后从环的任意一个位置断开 选出其中最大的q。 q的定义: 断开的字符串从两边取,w可以看成任意的颜色,然后取除‘w’之外遇到的第一种颜色,继续取直到遇到除了’w’和第一种颜色之外的颜色停止。 例如rrrwwwbr 从左取只能取6个,从右取只能取
2016-11-21 13:29:45 221
原创 USACO Friday the Thirteenth
/*ID: fan19132PROG: fridayLANG: C++*/#include"stdio.h"#include"string.h"struct person{ char name[20]; int money;}persons[15];int leap_month_day[13]={0,31,29,31,30,31,30,31,31,30,31,30
2016-11-21 12:39:34 348
原创 HDOJ 2091 空心三角形
#include"iostream"using namespace std;int main(){ char c; int n; int first = 1; /* * 5-1=4 * * 5-2=3 * * * **********
2016-11-17 22:02:40 998
原创 POJ 1611 并查集
KEY小的数当根#include #include #include using namespace std;int const max_person = 30000+5;int const max_group = 500+5;int rank[max_person];int father[max_person];void init(int n){ fo
2016-11-16 19:26:09 187
原创 2524 克鲁斯卡尔算法
#include"iostream"#include"stdio.h"#include"algorithm"#include"stdlib.h"using namespace std;const int maxn = 50000+5;int pre[maxn];void init(int n){ for(int i=1;i<=n;i++) pre[i] = i
2016-11-15 16:06:40 227
原创 POJ 1861 克鲁斯卡尔算法
#include #include #include using namespace std;const int maxn = 1000+5;const int maxm = 15000+5;struct E{ int x; int y; int len; int flag; E(){ x=y=len=fl
2016-11-15 15:25:22 318
原创 Haskell(一 ) ------ Windos下环境配置
步骤去官网下载安装包然后运行安装包路径最好就不要改了。打开命令行输入 cabal user-config init 会出现默认的放置配置文件的地址,然后到那个文件夹下修改config文件。添加 extra-prog-path: 文件安装路径\Haskell Platform\8.0.1\msys\usr\bin extra-lib-dirs: 文件安装路径\Haskell Platfor
2016-11-09 17:05:09 5752
原创 Windows 下配置 Common Lisp 环境
第一种方式:直接下载clisp+lispide这个方式是最简单的。第二种方式:下载slime+sbcl+emacs这个是标配在windows下下载sbcl 注意一下别下载成linux下的安装好sbcl重启 环境变量才生效当重启之后cmd窗口下输入sbcl出现的不是 错误以下就说明安装成功了c:\Users\cnm\Desktop>sbclvalidation
2016-11-07 19:25:41 1888
阿帕奇tomcat8.5
2018-01-22
《模糊数学》.pdf
2016-09-02
android为什么会运行出错
2016-07-20
android中运行程序出错
2016-07-20
为什么new int[4]== new int[4]的boolean值为flase
2016-04-10
hdoj 1007 两点之间最短距离的二分之一 提交之后超时了 求c语言解法 感激不敬
2015-12-04
HDOJ1004 用C语言做的不知道哪错了帮忙看一下问题出在哪里
2015-12-03
为什么 我就将gets换成了scanf就不会出现这样的问题了
2015-11-28
怎么用C语言设计分子量计算例如C6H8O12
2015-11-28
TA创建的收藏夹 TA关注的收藏夹
TA关注的人