线段树
jinduo16
这个作者很懒,什么都没留下…
展开
-
Matrix POJ - 2155
Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 <= i, j <= N). We can change the matrix in th...原创 2019-11-18 13:59:56 · 138 阅读 · 0 评论 -
Count Color POJ - 2777
Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is a very long board with length L centimeter, L is...原创 2019-11-17 13:28:23 · 169 阅读 · 0 评论 -
2017ACM/ICPC广西邀请赛 B Color it
Do you like painting? Little D doesn't like painting, especially messy color paintings. Now Little B is painting. To prevent him from drawing messy painting, Little D asks you to write a program to ma...原创 2019-11-12 19:47:44 · 213 阅读 · 0 评论 -
选举拉票 51Nod - 1494
现在你要竞选一个县的县长。你去对每一个选民进行了调查。你已经知道每一个人要选的人是谁,以及要花多少钱才能让这个人选你。现在你想要花最少的钱使得你当上县长。你当选的条件是你的票数比任何一个其它候选人的多(严格的多,不能和他们中最多的相等)。请计算一下最少要花多少钱。 Input 单组测试数据。 第一行有一个整数n (1 ≤ n ≤ 10^5),表示这个县的选民数目。 接下来有n行,每一行有两个整...原创 2019-11-12 13:22:03 · 222 阅读 · 0 评论 -
Mayor's posters POJ - 2528 (线段树+离散化)
The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council has finally d...原创 2019-11-11 14:33:14 · 140 阅读 · 0 评论 -
A Simple Problem with Integers POJ - 3468
You haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the ...原创 2019-11-09 15:29:15 · 92 阅读 · 0 评论 -
Lost Cows POJ - 2182
N (2 <= N <= 8,000) cows have unique brands in the range 1..N. In a spectacular display of poor judgment, they visited the neighborhood 'watering hole' and drank a few too many beers before dinn...原创 2019-11-09 12:50:17 · 182 阅读 · 0 评论