2014年1月23日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1806非常玄妙的rmq问题,这个st算法有点神#include #include using namespace std ;int dp[100005][20] ;int a[100005],b[100005] ;void makermq(int n,int *tt){ for(int i=0 ;i>1 ; if(a[mid]>temp) r=mid-1 ; else if(a[mid]=0 ;i--) { if(i=... 阅读全文
posted @ 2014-01-23 21:55 LegendaryAC 阅读(191) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1043http://www.cnblogs.com/goodness/archive/2010/05/04/1727141.html根据这篇文章说的八数码八境界,我这种做法大概是在境界三。。我选择的是康托展开作为哈希函数,在全排列问题中这个哈希函数可以很好的处理冲突http://zh.wikipedia.org/zh/%E5%BA%B7%E6%89%98%E5%B1%95%E5%BC%80当然白书上的那种哈希也是极好的。。#include #include #include using namespace s 阅读全文
posted @ 2014-01-23 10:15 LegendaryAC 阅读(649) 评论(0) 推荐(0) 编辑