上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 49 下一页
摘要: 倒过来看 , 每次总是选择最短的两块木板合并 , 用heap维护------------------------------------------------------------------------------#include#include#include#include#include... 阅读全文
posted @ 2015-06-06 16:31 JSZX11556 阅读(219) 评论(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 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 对于第 i 头牛 , 假如排名比它高和低的数位 n - 1 , 那么他的 rank 便可以确定 . floyd---------------------------------------------------------------------------------------#include... 阅读全文
posted @ 2015-06-06 15:21 JSZX11556 阅读(225) 评论(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 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 直接枚举-------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0... 阅读全文
posted @ 2015-06-06 14:17 JSZX11556 阅读(191) 评论(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 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 求LIS , 然后用 n 减去即为answer----------------------------------------------------------------------------#include#include#include#include#define rep( i , n ... 阅读全文
posted @ 2015-06-06 12:33 JSZX11556 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 维护一个h严格递减的栈 , 出栈时计算一下就好了..--------------------------------------------------------------------------------------#include#include#include#include#inclu... 阅读全文
posted @ 2015-06-06 12:14 JSZX11556 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 二分一下答案就好了...----------------------------------------------------------------------------------------#include#include#include#include#include#define re... 阅读全文
posted @ 2015-06-06 11:06 JSZX11556 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 直接二分答案然后判断.-----------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int ... 阅读全文
posted @ 2015-06-06 10:40 JSZX11556 阅读(203) 评论(0) 推荐(0) 编辑
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 49 下一页