线段树
文章平均质量分 68
RookieZQF
尽自己最大努力才能不后悔
展开
-
POJ 3321 Apple Tree
DescriptionThere is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been carefully nurturing the big apple tree.翻译 2016-01-23 18:45:58 · 333 阅读 · 0 评论 -
LA 3882 And Then There Was One
这道题是一道约瑟夫环问题,只不过数据加强了,因为不需要求出删除序列,只需要求出删除的最后一个的数字,所以有递推的方法和线段树#include #include #define lson l, m, rt << 1#define rson m+1, r, rt << 1 | 1const int maxn = 1000005;int cnt[maxn << 3];void Bui翻译 2015-12-06 22:17:06 · 211 阅读 · 0 评论 -
BC65 ZYB's Premutation
Problem DescriptionZYB has a premutation P,but he only remeber the reverse log of each prefix of the premutation,now he ask you torestore the premutation.Pair (i,j)(ij) is considered a翻译 2015-12-06 15:45:05 · 464 阅读 · 2 评论 -
NYOJ 600 花儿朵朵
描述输入第一行有个整数t,表示有t组测试数据,每组测试数据第一行为两个整数n,m(0输出对于每次游客的询问,输出一个整数在单独的一行,表示这个时间盛开的花有多少种。样例输入21 15 1042 31 44 8146样例输出0121春天到了,花儿朵朵盛开,hrdv是一座大花园的主人,在他的花园里种着许多种鲜花,每当这个时候,就会有一大群翻译 2016-01-25 20:47:22 · 393 阅读 · 0 评论