摘要: 哈哈,原来题意看错了,但有多个解的时候,输出起点靠前的,如果起点一样,则输出终点靠前的,修改后AC的代码如下:#include #include #include using namespace std;const int MAXN = 500005;typedef long long int64;int dish[MAXN];int64 dish_sum[MAXN];int64 get_sum(int L, int R) { return dish_sum[R] - dish_sum[L - 1];}class SegNode {public: int L, R; int ... 阅读全文
posted @ 2013-08-31 14:05 litstrong 阅读(280) 评论(0) 推荐(0)