
线段树
文章平均质量分 79
qq_775395462
是什么让我们每天早上7点起床,不辞辛苦来到公司上班,是穷吗?
不,是对老板的信任以及对公司企业文化的认可!
展开
-
Necklace (线段树单点更新+区间查询+离线操作)
Problem DescriptionMery has a beautiful necklace. The necklace is made up of N magic balls. Each ball has a beautiful value. The balls with the same beautiful value look the same, so if two or mor原创 2014-08-13 20:02:35 · 366 阅读 · 0 评论 -
Minimum Inversion Number
DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.For a given sequence of numbers a1, a2, ..., an, if we mov原创 2014-11-15 13:09:12 · 357 阅读 · 0 评论 -
敌兵布阵
DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。原创 2014-11-15 13:05:35 · 278 阅读 · 0 评论 -
I Hate It
Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整原创 2014-11-15 13:08:09 · 308 阅读 · 0 评论 -
A Simple Problem with Integers
DescriptionYou have N integers, 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. Th原创 2015-01-29 17:04:53 · 297 阅读 · 0 评论