摘要: 这个dp题很有学问,我也是照着标称写的 还需要学习 补: if(order[i] < order[i-1]) pre[j] += now[j]; 这句的解释 首先order表示的是每个数字排序之后的数组 order[0] 就是最小的那个数字是原来数组哪一个 但是会有等于的情况 所以这里定义的是如果 阅读全文
posted @ 2016-10-05 21:59 basasuya 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 能把 not working now 写成 not working hard now 还查一晚上也是没谁了 我的做法是维护两个set 分别是前20% 和后80% #include<iostream> #include<algorithm> #include<set> #include<cmath> 阅读全文
posted @ 2016-10-05 19:24 basasuya 阅读(144) 评论(0) 推荐(0) 编辑