2018年1月26日

Ultra-QuickSort (POJ 2299)树状数组+离散化

摘要: 题目链接 Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swa 阅读全文

posted @ 2018-01-26 17:40 欲儿很轻狂 阅读(138) 评论(0) 推荐(0)

Color the ball(HDU1556)树状数组

摘要: 每次对区间内气球进行一次染色,求n次操作后后所有气球染色次数。 树状数组,上下区间更新都可以,差别不大。 1.对于[x,y]区间,对第x-1位减1,第y位加1,之后向上统计 #include<bits/stdc++.h> using namespace std; const int maxn=100 阅读全文

posted @ 2018-01-26 10:24 欲儿很轻狂 阅读(113) 评论(0) 推荐(0)

导航