上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 49 下一页
摘要: BFS...---------------------------------------------------------------------------------------#include#include#include#include#include#define rep( i , ... 阅读全文
posted @ 2015-06-08 17:24 JSZX11556 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 状压dpdp( x , S ) 表示最后一个是 x , 当前选的奶牛集合为 S , 则状态转移方程 : dp( x , S ) = Σ dp( i , S - { i } ) ( i ∈ S , abs( h[ i ] - h[ x ] ) > k )-----------------------... 阅读全文
posted @ 2015-06-08 16:37 JSZX11556 阅读(208) 评论(0) 推荐(0) 编辑
摘要: QAQ我没读过书...四边形都不会判定了简单的dp....------------------------------------------------------------------------------#include#include#include#include#define rep... 阅读全文
posted @ 2015-06-08 09:15 JSZX11556 阅读(228) 评论(0) 推荐(0) 编辑
摘要: dp乱搞即可...( 我就是这样 A 的..后来想改快一点..然后就WA了...不理了------------------------------------------------------------------------------------------#include#include#... 阅读全文
posted @ 2015-06-08 08:58 JSZX11556 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 自己YY一下可以发现answer = n - fail[ n ]-----------------------------------------------------------------------------------#include#include#include#include#de... 阅读全文
posted @ 2015-06-07 17:48 JSZX11556 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 计算距离时平方爆了int结果就WA了一次......-----------------------------------------------------------------------------------------#include#include#include#include#in... 阅读全文
posted @ 2015-06-07 16:51 JSZX11556 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 从起点和终点各跑一次最短路 , 然后枚举每一条边 , 更新answer-----------------------------------------------------------------------------------------------------#include#inclu... 阅读全文
posted @ 2015-06-07 16:11 JSZX11556 阅读(366) 评论(0) 推荐(0) 编辑
摘要: orz...hzwer 对着大神的 code 看 , 稍微理解了.考虑一只牛到达 , 那它所在子树全部 +1 , 可以用BIT维护-----------------------------------------------------------------------#include#inclu... 阅读全文
posted @ 2015-06-07 15:36 JSZX11556 阅读(281) 评论(0) 推荐(0) 编辑
摘要: BFS...--------------------------------------------------------------------------------------------#include#include#include#include#include#define rep(... 阅读全文
posted @ 2015-06-07 12:41 JSZX11556 阅读(547) 评论(0) 推荐(0) 编辑
摘要: 先按时间排序( 开始结束都可以 ) , 然后 dp( i ) = max( dp( i ) , dp( j ) + 1 ) ( j #include#include#include#define rep( i , n ) for( int i = 0 ; i > n; rep( i , n ) ... 阅读全文
posted @ 2015-06-07 12:23 JSZX11556 阅读(316) 评论(0) 推荐(0) 编辑
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 49 下一页