---------------------分治
文章平均质量分 65
dxyinme
这个作者很懒,什么都没留下…
展开
-
[vijos1190](SCOI2005)繁忙的都市
题目描述城市C是一个非常繁忙的大都市,城市中的道路十分的拥挤,于是市长决定对其中的道路进行改造。城市C的道路是这样分布的:城市中有n个交叉路口,有些交叉路口之间有道路相连,两个交叉路口之间最多有一条道路相连接。这些道路是双向的,且把所有的交叉路口直接或间接的连接起来了。每条道路都有一个分值,分值越小表示这个道路越繁忙,越需要进行改造。但是市政府的资金有限,市长希望进行改造的道路越少越好,于是他提出下原创 2017-05-04 08:51:10 · 422 阅读 · 0 评论 -
[POJ3579]Median
Time Limit: 1000MS Memory Limit: 65536KDescriptionGiven N numbers,X1, X2, … , XN, let us calculate the difference of every pair of numbers:∣Xi−Xj∣(1≤i<j≤N)∣Xi−Xj∣(1≤i<j≤N) ∣Xi - Xj∣ (1 ≤ i < j ...原创 2018-07-30 22:31:28 · 156 阅读 · 0 评论 -
[HDU 5726]GCD
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionGive you a sequence of N(N≤100,000) integers :a1,...,an(0<ai≤1000,000,000)a1,...,an(0<ai≤...原创 2018-05-26 20:06:28 · 186 阅读 · 0 评论 -
[洛谷P1462]通往奥格瑞玛的道路
描述 在艾泽拉斯,有n个城市。编号为1,2,3,…,n。 城市之间有m条双向的公路,连接着两个城市,从某个城市到另一个城市,会遭到联盟的攻击,进而损失一定的血量。没经过一个城市,都会被收取一定的过路费(包括起点和终点)。路上并没有收费站。假设1为暴风城,n为奥格瑞玛,而他的血量最多为b,出发时他的血量是满的。 歪嘴哦不希望花很多钱,他想知道,在可以到达奥格瑞玛的情况下,他所经过的所有...原创 2016-08-17 19:28:12 · 525 阅读 · 0 评论 -
[codeforces]808D
time limit per test : 2 seconds memory limit per test : 256 megabytesVasya has an array a consisting of positive integer numbers. Vasya wants to divide this array into two non-empty consecutive par...原创 2018-02-26 19:29:28 · 209 阅读 · 0 评论 -
[codeforces]166B
ime limit per test : 2 seconds memory limit per test : 256 megabytesYou’ve got another geometrical task. You are given two non-degenerate polygons A and B as vertex coordinates. Polygon A is strictly原创 2017-12-09 19:47:43 · 315 阅读 · 0 评论 -
[codeforces]750C
time limit per test : 2 seconds memory limit per test : 256 megabytesEvery Codeforces user has rating, described with one integer, possibly negative or zero. Users are divided into two divisions. The原创 2017-12-06 18:19:32 · 231 阅读 · 0 评论 -
[vijos1763]Wormhole
描述一维的世界就是一个数轴。这个世界的狭小我们几乎无法想象。 在这个数轴上,有N个点。从左到右依次标记为点1到N。第i个点的坐标为Xi。经过漫长时间的物理变化和化学变化,这个一维世界中产生了一个高等智慧文明,而这N个点都成为了这个文明的一座城市。而点1则成为了这个文明的首都。 出于政治上和经济上的需要,首都不能和任何城市相距太远。所以政府决定在某两个城市耗巨资修建虫洞。一个修建了虫洞的城市可以瞬原创 2017-10-14 12:11:23 · 194 阅读 · 0 评论 -
[POJ3863]Business Center
Time Limit: 1000MS Memory Limit: 65536KDescriptionInternational Cyber Police Corporation (ICPC) had built a new mega-tall business center to host its headquarters and to lease some space for extra原创 2017-09-08 07:59:09 · 232 阅读 · 0 评论 -
[POJ 3061]Subsequence
DescriptionA sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length原创 2017-08-17 10:48:09 · 208 阅读 · 0 评论 -
[vijos1057]盖房子
描述永恒の灵魂最近得到了面积为n*m的一大块土地(高兴ING^_^),他想在这块土地上建造一所房子,这个房子必须是正方形的。但是,这块土地并非十全十美,上面有很多不平坦的地方(也可以叫瑕疵)。这些瑕疵十分恶心,以至于根本不能在上面盖一砖一瓦。他希望找到一块最大的正方形无瑕疵土地来盖房子。不过,这并不是什么难题,永恒の灵魂在10分钟内就轻松解决了这个问题。现在,您也来试试吧。输入格式输入文件第一行为两原创 2017-07-16 16:53:57 · 378 阅读 · 0 评论 -
[HDU6331]Problem M. Walking Plan
Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Problem Description There are n intersections in Bytetown, connected with m one way streets. Little Q likes sport ...原创 2018-09-12 15:05:39 · 223 阅读 · 0 评论