上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 49 下一页
摘要: MST , kruskal 直接跑----------------------------------------------------------------------#include#include#include#include#include#define rep( i , n ) fo... 阅读全文
posted @ 2015-06-03 21:36 JSZX11556 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 一棵树..或许用LCA比较好吧...但是我懒...写了个dijkstra也过了..----------------------------------------------------------------------------#include#include#include#include#... 阅读全文
posted @ 2015-06-03 12:31 JSZX11556 阅读(258) 评论(0) 推荐(0) 编辑
摘要: --------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i > V >> n; ... 阅读全文
posted @ 2015-06-02 22:07 JSZX11556 阅读(172) 评论(0) 推荐(0) 编辑
摘要: RMQ..-------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = ... 阅读全文
posted @ 2015-06-02 21:39 JSZX11556 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 最裸的01背包....---------------------------------------------------------------------#include#include#include#include#define clr( x , c ) memset( x , c , s... 阅读全文
posted @ 2015-06-02 21:12 JSZX11556 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 将edge按权值排序 , O( m² ) 枚举边 , 利用并查集维护连通信息.-----------------------------------------------------------------------------------------#include#include#inclu... 阅读全文
posted @ 2015-05-31 14:51 JSZX11556 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 并查集离线搞....------------------------------------------------------------------------------------#include#include#include#include#include#include#define ... 阅读全文
posted @ 2015-05-31 09:41 JSZX11556 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 虽然source写着dp , 而且很明显dp可以搞...但是数据不大 , 前缀和 + 枚举也水的过去.....-----------------------------------------------------------------------------------------------... 阅读全文
posted @ 2015-05-30 23:14 JSZX11556 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 离线处理 , 记下询问的左右端点并排序 , 然后可以利用树状数组 , 保证查询区间时每种颜色只计算一次------------------------------------------------------------------------------------------------#in... 阅读全文
posted @ 2015-05-30 21:51 JSZX11556 阅读(334) 评论(0) 推荐(1) 编辑
摘要: 一开始没有注意答案为0的情况然后就WA了...挺水的BFS..------------------------------------------------------------------------------#include#include#include#include#include#... 阅读全文
posted @ 2015-05-30 19:55 JSZX11556 阅读(203) 评论(0) 推荐(0) 编辑
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 49 下一页