树状数组
不哭的超人
愿你孤独的努力终有回报,愿你前行的路上有人相伴。
展开
-
Ultra-QuickSort(POJ2299)
Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence...原创 2020-10-19 15:27:38 · 146 阅读 · 0 评论 -
Stars(POJ2352)
Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not...原创 2019-07-18 16:53:12 · 255 阅读 · 0 评论 -
Mobile phones(POJ1195)
Description Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares form an S * S matrix with the rows and c...原创 2019-07-18 21:43:33 · 219 阅读 · 0 评论 -
Cows(POJ)
Description Farmer John’s cows have discovered that the clover growing along the ridge of the hill (which we can think of as a one-dimensional number line) in his field is particularly good. Farmer Jo...原创 2019-07-19 18:08:19 · 611 阅读 · 0 评论 -
P3374 【模板】树状数组 1
题目描述 如题,已知一个数列,你需要进行下面两种操作: 1.将某一个数加上x 2.求出某区间每一个数的和 输入输出格式 输入格式: 第一行包含两个整数N、M,分别表示该数列数字的个数和操作的总个数。 第二行包含N个用空格分隔的整数,其中第i个数字表示数列第i项的初始值。 接下来M行每行包含3个整数,表示一个操作,具体如下: 操作1: 格式:1 x k 含义:将第x个数加上k 操作2: 格式:2 x...原创 2019-06-30 16:23:14 · 223 阅读 · 0 评论