上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 59 下一页
摘要: #include#include#define N 10char s[N][N][N]={{"***","* *","* *","* *","***"},{" *"," *"," *"," *"," *"},{"***"," *","***","* ","***"},{"***" 阅读全文
posted @ 2014-05-06 15:57 HYDhyd 阅读(127) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;#define N 1100struct nodde {int x,y;}f[N],start;int h,n,m,visitt[N][N];int dis[4][2]={-1,0,1,0,0,1,0,-1};c... 阅读全文
posted @ 2014-05-05 23:43 HYDhyd 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #includedouble h;double tt;void s(long long m,long long n) { long long i,j,sum; j=1; sum=1; for(i=n;i>=n-m+1;i--,j++) { sum*=i; sum/=j; }... 阅读全文
posted @ 2014-05-05 15:57 HYDhyd 阅读(131) 评论(0) 推荐(0) 编辑
摘要: //假设n个人每个人都做对了两道题,那么要想获奖人数最少的话,那么做题数目肯定最多即全做对的,中间可能会小于零那么没有获奖的#includeint main() { int t,n,m,i,sum; scanf("%d",&t); while(t--) { scanf("%d",&n); ... 阅读全文
posted @ 2014-05-05 15:38 HYDhyd 阅读(100) 评论(0) 推荐(0) 编辑
摘要: #include#include#define N 300int pre[N];int find(int u) {if(u!=pre[u]) pre[u]=find(pre[u]);return pre[u];}struct node {int u,v,speed;}ma[1100];int cm... 阅读全文
posted @ 2014-05-04 23:34 HYDhyd 阅读(132) 评论(0) 推荐(0) 编辑
摘要: #include#include#define inf 100000000#define N 110#define min(a,b) a>b?b:a;int pre[N][N],dis[N][N],ma[N][N],path[N],num,minf;int n,m;void FLOYD() {int... 阅读全文
posted @ 2014-05-04 21:30 HYDhyd 阅读(152) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/Yz81128/archive/2012/08/15/2640940.html求最小环floyd求最小环2011-08-14 9:421 定义:通常来说最小环是针对有向图而言从一个点出发,经过一条简单路径回到起点成为环.图的最小环就是所有环中长度最小的.... 阅读全文
posted @ 2014-05-04 20:38 HYDhyd 阅读(247) 评论(0) 推荐(0) 编辑
摘要: //对数组排序后,对于边相同并且边的两端不在一个集合内的一定是等效边或者必加边,//第一数数,第二合并集合#include#include#define N 110000int pre[N];struct node {int x,y,w;}ma[N];int findd(int x) {if(x!=... 阅读全文
posted @ 2014-05-04 09:18 HYDhyd 阅读(147) 评论(0) 推荐(0) 编辑
摘要: #include#include//用c/c++会爆栈,用g++ac#define inf 0x3fffffff#define N 41000struct node {int u,v,w,next;}bian[N*2];int head[N],yong;int pre[N],dis[N],deep[... 阅读全文
posted @ 2014-05-03 16:14 HYDhyd 阅读(191) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/scau20110726/archive/2013/06/14/3135095.html 阅读全文
posted @ 2014-05-03 14:30 HYDhyd 阅读(102) 评论(0) 推荐(0) 编辑
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 59 下一页