摘要: 三角形向右对齐后 你想打掉一个砖块,那么你必须打掉右上方的三角形,前缀和维护 若是第i列若是k个,那么它右边的那一列至少选了k 1个 f[i][j][k] 表示从后向前选到第 i 列第j个一共打了k次的分数 c++ // luogu judger enable o2 include include 阅读全文
posted @ 2018-02-20 14:40 zzzzx 阅读(112) 评论(0) 推荐(0) 编辑
摘要: ```c++ /* dp[i][j][k]表示 已经选i个,本次选到了第j个,小红满意度k时,小明最大收益* */ #include #include using std::max; using std::min; const int maxn=107; inline int read() { int x=0,f=1; char c=getchar(); while(c'9... 阅读全文
posted @ 2018-02-20 14:14 zzzzx 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 题解真的是越写越懒 // luogu judger enable o2 include include using std::sort; const int maxn = 200006; int n,m,sum[maxn'9'){if(c==' ')f= 1;c=getchar();} while( 阅读全文
posted @ 2018-02-20 14:12 zzzzx 阅读(121) 评论(0) 推荐(0) 编辑