06 2015 档案

摘要:二维树状数组...自己YY一下再推一下应该可以搞出来...----------------------------------------------------------------------------------#include#include#include#include#define... 阅读全文
posted @ 2015-06-27 22:16 JSZX11556 阅读(376) 评论(0) 推荐(0) 编辑
摘要:树链剖分..样例太大了根本没法调...顺便把数据生成器放上来--------------------------------------------------------------------------------#include#include#include#include#define ... 阅读全文
posted @ 2015-06-26 17:01 JSZX11556 阅读(2120) 评论(0) 推荐(0) 编辑
摘要:dpdp( x , k ) = max( dp( x - 1 , k - 1 ) + *** , dp( x - 1 , k ) + *** ) *** = 0 or 1 ,根据情况(BZOJ 1750双倍经验)--------------------------------------------... 阅读全文
posted @ 2015-06-25 20:20 JSZX11556 阅读(421) 评论(0) 推荐(0) 编辑
摘要:LCT..--------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i =... 阅读全文
posted @ 2015-06-25 14:15 JSZX11556 阅读(165) 评论(0) 推荐(0) 编辑
摘要:斐波那契数列<10^9的数很少很少...所以直接暴力枚举就行了...-------------------------------------------------------------#include#include#include#include#define rep( i , n ) fo... 阅读全文
posted @ 2015-06-24 21:33 JSZX11556 阅读(275) 评论(0) 推荐(0) 编辑
摘要:LCT...略麻烦...--------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( ... 阅读全文
posted @ 2015-06-24 21:07 JSZX11556 阅读(242) 评论(0) 推荐(0) 编辑
摘要:LCT..------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i ... 阅读全文
posted @ 2015-06-24 17:32 JSZX11556 阅读(219) 评论(0) 推荐(0) 编辑
摘要:LCT...----------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i s + ch[... 阅读全文
posted @ 2015-06-23 22:07 JSZX11556 阅读(311) 评论(0) 推荐(0) 编辑
摘要:dp...dp( l , r , k ) , 表示 吃了[ l , r ] 的草 , k = 1 表示最后在 r 处 , k = 0 表示最后在 l 处 .--------------------------------------------------------------#include#i... 阅读全文
posted @ 2015-06-23 14:45 JSZX11556 阅读(386) 评论(0) 推荐(0) 编辑
摘要:树链剖分..对于每个宗教都建一颗线段树 , 然后动态开点..------------------------------------------------------------------------------------------#include#include#include#inclu... 阅读全文
posted @ 2015-06-22 21:54 JSZX11556 阅读(200) 评论(0) 推荐(0) 编辑
摘要:splay..( BZOJ 1507 题目基本相同..双倍经验 )-----------------------------------------------------------------------------#include#include#include#include#define ... 阅读全文
posted @ 2015-06-22 19:50 JSZX11556 阅读(220) 评论(0) 推荐(0) 编辑
摘要:因为没注意到long long 就 TLE 了...二分一下答案就Ok了..------------------------------------------------------------------------------#include#include#include#include#d... 阅读全文
posted @ 2015-06-22 13:48 JSZX11556 阅读(357) 评论(0) 推荐(0) 编辑
摘要:最小最大...又是经典的二分答案做法..--------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for... 阅读全文
posted @ 2015-06-21 21:14 JSZX11556 阅读(370) 评论(0) 推荐(0) 编辑
摘要:dp( l , r ) = sum( l , r ) - min( dp( l + 1 , r ) , dp( l , r - 1 ) ) 被卡空间....我们可以发现 l > r 是无意义的 , 所以可以省下一半的空间----------------------------------------... 阅读全文
posted @ 2015-06-21 20:32 JSZX11556 阅读(277) 评论(0) 推荐(0) 编辑
摘要:splay..由于想偷懒 , 不想写 insert 和 delete 操作..于是用经典的 reverse 操作 + get 一段区间操作 水过去了.. 无论是 bottom , top 还是 insert , 都相当于两次 reversesplay 太灵活了..很多题目应该都是怎么乱搞都可以的吧.... 阅读全文
posted @ 2015-06-20 17:12 JSZX11556 阅读(277) 评论(0) 推荐(0) 编辑
摘要:splay.....------------------------------------------------------------------------#include#include#include#include#include#define rep( i , n ) for( in... 阅读全文
posted @ 2015-06-20 15:28 JSZX11556 阅读(354) 评论(0) 推荐(0) 编辑
摘要:LCT....---------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int ... 阅读全文
posted @ 2015-06-17 21:58 JSZX11556 阅读(204) 评论(0) 推荐(0) 编辑
摘要:n #include#include#include#include#define rep( i , n ) for( int i = 0 ; i S;int main() { freopen( "test.in" , "r" , stdin ); int n; cin >> n; rep( i... 阅读全文
posted @ 2015-06-16 22:03 JSZX11556 阅读(260) 评论(0) 推荐(0) 编辑
摘要:kpm大神说可以用块状链表写...但是我不会...写了个splay....先离散化 , 然后splay结点加个min维护最小值 , 就可以了...( ps BZOJ 3506 题意一样 , 双倍经验 )-------------------------------------------------... 阅读全文
posted @ 2015-06-16 14:37 JSZX11556 阅读(227) 评论(0) 推荐(0) 编辑
摘要:先orz一下clj...我的splay跟着他写的...这道题很普通的splay我调了这么久 T T , 就是因为 null 的值初始化为0 , 结果就挂了...----------------------------------------------------------------------... 阅读全文
posted @ 2015-06-15 21:56 JSZX11556 阅读(307) 评论(0) 推荐(0) 编辑
摘要:树链剖分...略麻烦...--------------------------------------------------------------------------------#include#include#include#include#include#define rep( i , ... 阅读全文
posted @ 2015-06-15 14:36 JSZX11556 阅读(207) 评论(0) 推荐(0) 编辑
摘要:普通的最短路...dijkstra水过..------------------------------------------------------------------------------#include#include#include#include#include#define rep... 阅读全文
posted @ 2015-06-14 22:00 JSZX11556 阅读(354) 评论(0) 推荐(0) 编辑
摘要:直接用STL的的deque就好了...----------------------------------------------------------------------#include#include#include#include#include#define rep( i , n ) ... 阅读全文
posted @ 2015-06-14 20:46 JSZX11556 阅读(250) 评论(0) 推荐(0) 编辑
摘要:01背包...-----------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i ... 阅读全文
posted @ 2015-06-14 20:34 JSZX11556 阅读(360) 评论(0) 推荐(0) 编辑
摘要:树形dp..水------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i... 阅读全文
posted @ 2015-06-14 20:23 JSZX11556 阅读(276) 评论(0) 推荐(0) 编辑
摘要:略恶心的线段树...不过只要弄清楚了AC应该不难....----------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( ... 阅读全文
posted @ 2015-06-14 13:57 JSZX11556 阅读(308) 评论(0) 推荐(0) 编辑
摘要:这道题用 LCA 就可以水过去 , 但是我太弱了 QAQ 倍增写LCA总是写残...于是就写了树链剖分...其实也不难写 , 线段树也不用用到 , 自己YY一下然后搞一搞就过了...速度还挺快的好像= = #9---------------------------------------------... 阅读全文
posted @ 2015-06-14 11:00 JSZX11556 阅读(218) 评论(0) 推荐(0) 编辑
摘要:因为是棵树 , 所以直接 dfs 就好了...-------------------------------------------------------------------------------------#include#include#include#include#define re... 阅读全文
posted @ 2015-06-14 10:06 JSZX11556 阅读(292) 评论(0) 推荐(0) 编辑
摘要:树链剖分...细节挺多的...---------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) f... 阅读全文
posted @ 2015-06-14 00:04 JSZX11556 阅读(219) 评论(0) 推荐(0) 编辑
摘要:我们给白色的边增加权值 , 则选到的白色边就会变多 , 因此可以二分一下.不过这道题有点小坑...-------------------------------------------------------------------------------------------#include#i... 阅读全文
posted @ 2015-06-13 16:33 JSZX11556 阅读(208) 评论(0) 推荐(0) 编辑
摘要:说多了都是泪啊...调了这么久..离线可以搞 , 树链剖分就OK了...----------------------------------------------------------------------------------------#include#include#include#i... 阅读全文
posted @ 2015-06-13 15:28 JSZX11556 阅读(231) 评论(0) 推荐(0) 编辑
摘要:树链剖分...子树的树链剖分序必定是一段区间 , 先记录一下就好了---------------------------------------------------------------------------#include#include#include#include#define re... 阅读全文
posted @ 2015-06-12 20:18 JSZX11556 阅读(228) 评论(0) 推荐(0) 编辑
摘要:树链剖分...不知道为什么跑这么慢 = = 调了一节课啊跪..-------------------------------------------------------------------------------#include#include#include#include#define ... 阅读全文
posted @ 2015-06-11 21:48 JSZX11556 阅读(206) 评论(0) 推荐(0) 编辑
摘要:线段树..打个 mul , add 的标记就好了..这个速度好像还挺快的...( 相比我其他代码 = = ) 好像是#35..---------------------------------------------------------------#include#include#include... 阅读全文
posted @ 2015-06-11 12:30 JSZX11556 阅读(237) 评论(0) 推荐(0) 编辑
摘要:直接从每个奶牛所在的farm dfs , 然后算一下..----------------------------------------------------------------------------------------#include#include#include#include#i... 阅读全文
posted @ 2015-06-10 20:29 JSZX11556 阅读(260) 评论(0) 推荐(0) 编辑
摘要:将 0 变为 -1 , 则只需找区间和为 0 , 即前缀和相同的最长区间 , 记录一下每个前缀和出现的最早和最晚的位置 , 比较一下就 OK 了------------------------------------------------------------------------------... 阅读全文
posted @ 2015-06-10 19:27 JSZX11556 阅读(261) 评论(0) 推荐(0) 编辑
摘要:跑两遍最短路就好了..话说这翻译2333----------------------------------------------------------------------#include#include#include#include#include#define rep( i , n )... 阅读全文
posted @ 2015-06-10 14:14 JSZX11556 阅读(283) 评论(0) 推荐(0) 编辑
摘要:将牛拆成两个点 i 和 i' 并连弧 , S 向每种 food 连边 , 每种 drink 向 T 连边 , 每种 food 向喜欢他的 cow 连边 到 i , 每种 drink 从喜欢它的 cow i' 连边 , 全部容量均为 1 , answer = maxflow--------------... 阅读全文
posted @ 2015-06-10 13:54 JSZX11556 阅读(204) 评论(0) 推荐(0) 编辑
摘要:考虑相邻的两头奶牛 a , b , 我们发现它们顺序交换并不会影响到其他的 , 所以我们可以直接按照这个进行排序---------------------------------------------------------------------------------#include#incl... 阅读全文
posted @ 2015-06-09 20:58 JSZX11556 阅读(341) 评论(0) 推荐(0) 编辑
摘要:水dp先按开始时间排序 , 然后dp.dp( i ) 表示前 i 个时间段选第 i 个时间段的最优答案 , 则 dp( i ) = max( dp( j ) ) + w_i ( 0 #include#include#include#define rep( i , n ) for( int i = 0... 阅读全文
posted @ 2015-06-09 20:36 JSZX11556 阅读(293) 评论(0) 推荐(0) 编辑
摘要:完全背包..---------------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for(... 阅读全文
posted @ 2015-06-09 13:56 JSZX11556 阅读(220) 评论(0) 推荐(0) 编辑
摘要:最短路...多加一维表示更新了多少条路----------------------------------------------------------------------------------#include#include#include#include#include#define r... 阅读全文
posted @ 2015-06-08 20:26 JSZX11556 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-06-08 20:01 JSZX11556 阅读(139) 评论(0) 推荐(0) 编辑
摘要:一开始直接 O( n² ) 暴力..结果就 A 了... USACO 数据是有多弱 = =先sort , 然后自己再YY一下就能想出来...具体看code-------------------------------------------------------------------------... 阅读全文
posted @ 2015-06-08 19:59 JSZX11556 阅读(203) 评论(0) 推荐(0) 编辑
摘要:一道水 dp ...然后我一开始用 BFS ...结果 MLE 了...dp[ i ][ j ][ k ] 由它四个方向上的 k - 1 转移.------------------------------------------------------------------------------... 阅读全文
posted @ 2015-06-08 18:43 JSZX11556 阅读(240) 评论(0) 推荐(0) 编辑
摘要:BFS...---------------------------------------------------------------------------------------#include#include#include#include#include#define rep( i , ... 阅读全文
posted @ 2015-06-08 17:24 JSZX11556 阅读(201) 评论(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 阅读(209) 评论(0) 推荐(0) 编辑
摘要:QAQ我没读过书...四边形都不会判定了简单的dp....------------------------------------------------------------------------------#include#include#include#include#define rep... 阅读全文
posted @ 2015-06-08 09:15 JSZX11556 阅读(232) 评论(0) 推荐(0) 编辑
摘要:dp乱搞即可...( 我就是这样 A 的..后来想改快一点..然后就WA了...不理了------------------------------------------------------------------------------------------#include#include#... 阅读全文
posted @ 2015-06-08 08:58 JSZX11556 阅读(201) 评论(0) 推荐(0) 编辑
摘要:自己YY一下可以发现answer = n - fail[ n ]-----------------------------------------------------------------------------------#include#include#include#include#de... 阅读全文
posted @ 2015-06-07 17:48 JSZX11556 阅读(177) 评论(0) 推荐(0) 编辑
摘要:计算距离时平方爆了int结果就WA了一次......-----------------------------------------------------------------------------------------#include#include#include#include#in... 阅读全文
posted @ 2015-06-07 16:51 JSZX11556 阅读(272) 评论(0) 推荐(0) 编辑
摘要:从起点和终点各跑一次最短路 , 然后枚举每一条边 , 更新answer-----------------------------------------------------------------------------------------------------#include#inclu... 阅读全文
posted @ 2015-06-07 16:11 JSZX11556 阅读(368) 评论(0) 推荐(0) 编辑
摘要:orz...hzwer 对着大神的 code 看 , 稍微理解了.考虑一只牛到达 , 那它所在子树全部 +1 , 可以用BIT维护-----------------------------------------------------------------------#include#inclu... 阅读全文
posted @ 2015-06-07 15:36 JSZX11556 阅读(286) 评论(0) 推荐(0) 编辑
摘要:BFS...--------------------------------------------------------------------------------------------#include#include#include#include#include#define rep(... 阅读全文
posted @ 2015-06-07 12:41 JSZX11556 阅读(564) 评论(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 阅读(320) 评论(0) 推荐(0) 编辑
摘要:dp( L , R ) = max( dp( L + 1 , R ) + V_L * ( n - R + L ) , dp( L , R - 1 ) + V_R * ( n - R + L ) )边界 : dp( i , i ) = V[ i ] * n-----------------------... 阅读全文
posted @ 2015-06-07 11:36 JSZX11556 阅读(329) 评论(0) 推荐(0) 编辑
摘要:裸最短路..------------------------------------------------------------------------------------#include#include#include#include#include#define rep( i , n )... 阅读全文
posted @ 2015-06-07 11:23 JSZX11556 阅读(258) 评论(0) 推荐(0) 编辑
摘要:选取任意一个点为root , size[ x ] 表示以 x 为根的子树的奶牛数 , dp一次计算出size[ ] && 选 root 为集会地点的不方便程度 . 考虑集会地点由 x 点向它的子节点 son 转移 , 那么以 son 为集会地点比以 x 为集会地点要多 dist( x , son )... 阅读全文
posted @ 2015-06-07 10:49 JSZX11556 阅读(247) 评论(0) 推荐(0) 编辑
摘要:线段树..--------------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( i... 阅读全文
posted @ 2015-06-07 09:54 JSZX11556 阅读(172) 评论(0) 推荐(0) 编辑
摘要:今天在刷USACO月赛 , 刷水.... A了18道.. ranklist day 排到了第一...截图留念 阅读全文
posted @ 2015-06-06 23:02 JSZX11556 阅读(151) 评论(1) 推荐(1) 编辑
摘要:线段树..---------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i ... 阅读全文
posted @ 2015-06-06 21:18 JSZX11556 阅读(261) 评论(0) 推荐(0) 编辑
摘要:BFS... 我连水题都不会写了QAQ-------------------------------------------------------------------------#include#include#include#include#include#define rep( i , n... 阅读全文
posted @ 2015-06-06 20:51 JSZX11556 阅读(216) 评论(0) 推荐(0) 编辑
摘要:贪心...按截止时间排序 , 然后从小到大考虑 . 假设当前考虑第 i 个任务 , 若目前已选工作数 #include#include#include#include#define rep( i , n ) for( int i = 0 ; i rhs.t; } };data A[ maxn ... 阅读全文
posted @ 2015-06-06 17:56 JSZX11556 阅读(259) 评论(0) 推荐(0) 编辑
摘要:无限背包dp..因为题目中说至少到 H 磅 , 我就直接把 H * 2 了..--------------------------------------------------------------------------#include#include#include#include#defi... 阅读全文
posted @ 2015-06-06 17:17 JSZX11556 阅读(284) 评论(0) 推荐(0) 编辑
摘要:这道题和蔡大神出的今年STOI初中组的第二题几乎一模一样...先跑一遍最短路 , 再把所有边反向 , 再跑一遍 , 所有点两次相加的最大值即为answer-------------------------------------------------------------------------... 阅读全文
posted @ 2015-06-06 17:05 JSZX11556 阅读(220) 评论(0) 推荐(0) 编辑
摘要:倒过来看 , 每次总是选择最短的两块木板合并 , 用heap维护------------------------------------------------------------------------------#include#include#include#include#include... 阅读全文
posted @ 2015-06-06 16:31 JSZX11556 阅读(223) 评论(0) 推荐(0) 编辑
摘要:裸的LIS-----------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i > n; re... 阅读全文
posted @ 2015-06-06 15:41 JSZX11556 阅读(350) 评论(0) 推荐(0) 编辑
摘要:对于第 i 头牛 , 假如排名比它高和低的数位 n - 1 , 那么他的 rank 便可以确定 . floyd---------------------------------------------------------------------------------------#include... 阅读全文
posted @ 2015-06-06 15:21 JSZX11556 阅读(230) 评论(0) 推荐(0) 编辑
摘要:dp[ i ] = max( dp[ j ] + sum( M_1 ~ M_( i - j ) ) + M , sum( M_1 ~ M_i ) ) ( 1 #include#include#include#define rep( i , n ) for( int i = 0 ; i > n; c... 阅读全文
posted @ 2015-06-06 15:03 JSZX11556 阅读(245) 评论(0) 推荐(0) 编辑
摘要:直接枚举-------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0... 阅读全文
posted @ 2015-06-06 14:17 JSZX11556 阅读(197) 评论(0) 推荐(0) 编辑
摘要:数据 n #include#include#include#define rep( i , n ) for( int i = 0 ; i > n; rep( i , n ) { char c = getchar(); while( ! isupper( c ) ) c = get... 阅读全文
posted @ 2015-06-06 13:54 JSZX11556 阅读(308) 评论(0) 推荐(0) 编辑
摘要:求LIS , 然后用 n 减去即为answer----------------------------------------------------------------------------#include#include#include#include#define rep( i , n ... 阅读全文
posted @ 2015-06-06 12:33 JSZX11556 阅读(238) 评论(0) 推荐(0) 编辑
摘要:维护一个h严格递减的栈 , 出栈时计算一下就好了..--------------------------------------------------------------------------------------#include#include#include#include#inclu... 阅读全文
posted @ 2015-06-06 12:14 JSZX11556 阅读(216) 评论(0) 推荐(0) 编辑
摘要:二分一下答案就好了...----------------------------------------------------------------------------------------#include#include#include#include#include#define re... 阅读全文
posted @ 2015-06-06 11:06 JSZX11556 阅读(250) 评论(0) 推荐(0) 编辑
摘要:直接二分答案然后判断.-----------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int ... 阅读全文
posted @ 2015-06-06 10:40 JSZX11556 阅读(206) 评论(0) 推荐(0) 编辑
摘要:dp...-------------------------------------------------------------------------------#include#include#include#include#include#define rep( i , n ) for( ... 阅读全文
posted @ 2015-06-06 10:22 JSZX11556 阅读(442) 评论(0) 推荐(0) 编辑
摘要:dp[ i ][ j ] = max( dp[ i - 1 ][ k ] + w[ i ][ j - k ] ) ( 0 #include#include#include#include#define rep( i , n ) for( int i = 0 ; i > n >> m >> T; ... 阅读全文
posted @ 2015-06-05 19:30 JSZX11556 阅读(257) 评论(0) 推荐(0) 编辑
摘要:直接floyd..----------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i =... 阅读全文
posted @ 2015-06-05 16:32 JSZX11556 阅读(195) 评论(0) 推荐(0) 编辑
摘要:dpdp[ i ] 表示第 i 个不选 , 前 i 个的选择合法的最小损失 , dp[ i ] = min( dp[ j ] ) ( max( 0 , i - 1 - k ) #include#include#include#include#define rep( i , n ) for( int ... 阅读全文
posted @ 2015-06-05 15:23 JSZX11556 阅读(243) 评论(0) 推荐(0) 编辑
摘要:有点类似背包 , 就是那样子搞...------------------------------------------------------------------------------------#include#include#include#include#define rep( i ,... 阅读全文
posted @ 2015-06-05 14:16 JSZX11556 阅读(231) 评论(0) 推荐(0) 编辑
摘要:直接floyd..-----------------------------------------------------------------------#include#include#include#include#include#define rep( i , n ) for( int ... 阅读全文
posted @ 2015-06-04 22:13 JSZX11556 阅读(201) 评论(0) 推荐(0) 编辑
摘要:dp , dp[ i ][ j ] = max( dp[ k ][ j - 1 ] ) + G[ i ][ j ] ( i - 1 0 )一开始没注意到要 dp[ k ][ j - 1 ] > 0 才能取 , 然后就WA 了2次...--------------------------------... 阅读全文
posted @ 2015-06-04 21:42 JSZX11556 阅读(226) 评论(0) 推荐(0) 编辑
摘要:从左往右,从右往左 扫两遍,单调栈维护...----------------------------------------------------------------------#include#include#include#include#include#define rep( i , n... 阅读全文
posted @ 2015-06-04 20:47 JSZX11556 阅读(244) 评论(0) 推荐(0) 编辑
摘要:MST...一开始没注意-1结果就WA了...----------------------------------------------------------------------------#include#include#include#include#include#include#de... 阅读全文
posted @ 2015-06-04 19:32 JSZX11556 阅读(176) 评论(0) 推荐(0) 编辑
摘要:背包dp..--------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i ... 阅读全文
posted @ 2015-06-04 13:16 JSZX11556 阅读(255) 评论(0) 推荐(0) 编辑
摘要:MST , kruskal 直接跑----------------------------------------------------------------------#include#include#include#include#include#define rep( i , n ) fo... 阅读全文
posted @ 2015-06-03 21:36 JSZX11556 阅读(170) 评论(0) 推荐(0) 编辑
摘要:一棵树..或许用LCA比较好吧...但是我懒...写了个dijkstra也过了..----------------------------------------------------------------------------#include#include#include#include#... 阅读全文
posted @ 2015-06-03 12:31 JSZX11556 阅读(260) 评论(0) 推荐(0) 编辑
摘要:--------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i > V >> n; ... 阅读全文
posted @ 2015-06-02 22:07 JSZX11556 阅读(174) 评论(0) 推荐(0) 编辑
摘要:RMQ..-------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = ... 阅读全文
posted @ 2015-06-02 21:39 JSZX11556 阅读(210) 评论(0) 推荐(0) 编辑
摘要:最裸的01背包....---------------------------------------------------------------------#include#include#include#include#define clr( x , c ) memset( x , c , s... 阅读全文
posted @ 2015-06-02 21:12 JSZX11556 阅读(188) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示