摘要:
倒过来看 , 每次总是选择最短的两块木板合并 , 用heap维护------------------------------------------------------------------------------#include#include#include#include#include... 阅读全文
摘要:
裸的LIS-----------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i > n; re... 阅读全文
摘要:
对于第 i 头牛 , 假如排名比它高和低的数位 n - 1 , 那么他的 rank 便可以确定 . floyd---------------------------------------------------------------------------------------#include... 阅读全文
摘要:
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... 阅读全文
摘要:
直接枚举-------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 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... 阅读全文
摘要:
求LIS , 然后用 n 减去即为answer----------------------------------------------------------------------------#include#include#include#include#define rep( i , n ... 阅读全文
摘要:
维护一个h严格递减的栈 , 出栈时计算一下就好了..--------------------------------------------------------------------------------------#include#include#include#include#inclu... 阅读全文
摘要:
二分一下答案就好了...----------------------------------------------------------------------------------------#include#include#include#include#include#define re... 阅读全文
摘要:
直接二分答案然后判断.-----------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int ... 阅读全文