上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 47 下一页

2014年3月19日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3986从开始的最短路里依次删一条边,求新的最短路,求最长的最短路删边操作要标记节点以及节点对应的边#include #include #include #include using namespace std ;c... 阅读全文
posted @ 2014-03-19 00:55 LegendaryAC 阅读(374) 评论(0) 推荐(0) 编辑

2014年3月14日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2175做得好辛苦的一道规律题,至于为什么辛苦。。dont ask me why。。。n号盘子出现的位置是(1,3,5,7......)*2^(n-1)#include using namespace std ;typedef __int64 ll ;int main(){ ll a[105] ; a[1]=1 ; for(int i=2 ;i<64 ;i++) a[i]=a[i-1]*2 ; ll n,m ; while(~scanf("%I64d%I64d",&n... 阅读全文
posted @ 2014-03-14 23:15 LegendaryAC 阅读(200) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1535水题单向图,从1到P所有点,再从所有点回到1,问最小花费先求一遍1的最短路,然后反向建图,再求一遍1的最短路#include #include using namespace std ;const int I... 阅读全文
posted @ 2014-03-14 19:32 LegendaryAC 阅读(200) 评论(0) 推荐(0) 编辑

2014年3月12日

摘要: 可判环,可算负权边,编码简单,很强的算法int spfa(int s){ for(int i=1 ;i q ; q.push(s) ; ct[s]++ ; while(!q.empty()) { int u=q.front() ; q.pop... 阅读全文
posted @ 2014-03-12 21:18 LegendaryAC 阅读(162) 评论(0) 推荐(0) 编辑

2014年3月9日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2323把六边形抽象成坐标进行dp,抽象出的坐标关系必须满足六边形之间的关系。很有趣的一道dp#include using namespace std ;int dp[25][25][25] ;int main(){ dp[0][7][7]=1 ; for(int i=1 ;i<=14 ;i++) { for(int j=0 ;j<=14 ;j++) { for(int k=0 ;k<=14 ;k++) dp[i]... 阅读全文
posted @ 2014-03-09 21:25 LegendaryAC 阅读(178) 评论(0) 推荐(0) 编辑

2014年3月4日

摘要: 我只想说,因式分解,我这辈子都忘不掉怎么写map M ;int temp=x ;for(int i=2 ;i*i1)M[temp]=1 ;//忘了这句话就是SB View Code 阅读全文
posted @ 2014-03-04 22:24 LegendaryAC 阅读(114) 评论(0) 推荐(0) 编辑

2014年2月28日

摘要: 模型:一个凸n边形,用n-3条不相交的对角线把它分成n-2个三角形,求不同的方法数目边界为f(2)=f(3)=1,第四项开始为2、5、14、42、132、429、1430、4862、16796递推公式:f(n+1)=(4*n-6)*f(n)/n 阅读全文
posted @ 2014-02-28 22:25 LegendaryAC 阅读(162) 评论(0) 推荐(0) 编辑
 
摘要: 当强者习惯于强大,弱者习惯于弱小我们是否应该问问自己:初心何在? 阅读全文
posted @ 2014-02-28 15:39 LegendaryAC 阅读(133) 评论(0) 推荐(0) 编辑
 
摘要: 陷入难以言说的深深的绝望无力,无助,暗无天日,看不到光明,看不到未来,不知道何去何从但我依然坚信这道坎一定可以过去,黎明前的夜总是黑暗的,属于我的光明终将来临沼泽中的旅行者,只要还没死掉,就还没有失败 阅读全文
posted @ 2014-02-28 13:51 LegendaryAC 阅读(200) 评论(0) 推荐(0) 编辑

2014年2月23日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1384#include #include #include #include using namespace std ;const int INF=0xfffffff ;int vis[50005],dis[500... 阅读全文
posted @ 2014-02-23 15:20 LegendaryAC 阅读(146) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 47 下一页