2011年11月28日

UESTC 1598 兰斯的后宫计划

摘要: 这道题可以用线段树来求解,当然,如果给的数据没有负值,同样可以用二分的思想去做,效率和线段树差不多View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #define max(a,b) a>b?a:b 5 struct node 6 { 7 int left,right,maxSum; 8 }; 9 node Tree[400100];10 int sum[100010],value[100010];11 void build_tree(int k,int l 阅读全文

posted @ 2011-11-28 09:22 lonelycatcher 阅读(390) 评论(0) 推荐(0) 编辑

导航