![](https://img-blog.csdnimg.cn/20190828173246830.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
2018暑假ACM集训
名字太长容易被发现并打死
这个作者很懒,什么都没留下…
展开
-
HDU -1213 How Many Tables(并查集)
How Many TablesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionToday is Ignatius’ birthday. He invites a lot of friends. Now it’s dinner ti...原创 2019-08-13 17:15:26 · 395 阅读 · 0 评论 -
POJ- 1611 The Suspects(并查集)
The SuspectsTime Limit: 1000MSMemory Limit: 20000KDescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-M...原创 2019-08-13 17:09:04 · 349 阅读 · 0 评论 -
POJ -2524 Ubiquitous Religions(并查集)
Ubiquitous ReligionsTime Limit: 5000MSMemory Limit: 65536KDescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interes...原创 2019-08-13 16:54:36 · 365 阅读 · 0 评论 -
HDU -1272 小希的迷宫(并查集)
小希的迷宫Time Limit: 2000/1000 MS (Java/Others)Time Limit: 2000/1000 MS (Java/Others)Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是...原创 2019-08-13 16:23:59 · 322 阅读 · 0 评论 -
HDU -1233 还是畅通工程(并查集,最小生成树)
还是畅通工程Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公...原创 2019-08-13 16:17:30 · 417 阅读 · 0 评论 -
POJ -2236 Wireless Network(并查集)
Wireless NetworkTime Limit: 10000MSMemory Limit: 65536KDescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the...原创 2019-08-13 16:03:21 · 420 阅读 · 0 评论 -
POJ -1287 Networking(并查集,最小生成树)
NetworkingTime Limit: 1000MSMemory Limit: 10000KDescriptionYou are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, a...原创 2019-08-13 10:39:29 · 405 阅读 · 0 评论 -
POJ -2377 Bad Cowtractors(并查集,最小生成树)
Bad CowtractorsTime Limit: 1000MSMemory Limit: 65536KDescriptionBessie has been hired to build a cheap internet network among Farmer John’s N (2 <= N <= 1,000) barns that are convenie...原创 2019-08-13 10:31:56 · 397 阅读 · 0 评论 -
POJ -1308 HDU -1325 Is It A Tree?
Is It A Tree?Time Limit: 1000MSMemory Limit: 10000KDescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by ...原创 2019-08-12 15:50:01 · 390 阅读 · 0 评论 -
POJ -2104 K-th Number (线段树)
K-th NumberTime Limit: 20000MSMemory Limit: 65536KDescriptionYou are working for Macrohard company in data structures department. After failing your previous task about key insertion you we...原创 2019-08-09 19:53:52 · 824 阅读 · 0 评论 -
POJ -3468 A Simple Problem with Integers(线段树+lazy数组)
A Simple Problem with IntegersTime Limit: 5000MSMemory Limit: 131072KDescriptionYou have N integers, A1, A2, … , AN. You need to deal with two kinds of operations. One type of operation is ...原创 2019-08-09 11:04:29 · 553 阅读 · 0 评论 -
POJ -2299 Ultra-QuickSort(归并排序)
Ultra-QuickSortTime Limit: 7000MSMemory Limit: 65536KDescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integer...原创 2019-08-09 10:12:30 · 571 阅读 · 0 评论 -
HDU -1754 I Hate It(线段树)
I Hate ItTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一...原创 2019-08-08 19:46:56 · 562 阅读 · 0 评论 -
HDU -1166 敌兵布阵(线段树)
敌兵布阵Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这...原创 2019-08-08 19:32:25 · 617 阅读 · 0 评论 -
HDU -1069 Monkey and Banana(dp)
M - Monkey and BananaTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionA group of researchers are designing an experiment to test the IQ of a...原创 2019-08-08 17:16:04 · 625 阅读 · 0 评论 -
HDU -1232 畅通工程(并查集)
畅通工程Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互...原创 2019-08-13 16:11:00 · 358 阅读 · 0 评论 -
HDU -2216 Game III(BFS)
#include<iostream>#include<cstdio>#include<cstring>#include<string>#include<cmath>#include<queue>#include<algorithm>#include<stack>#include<v...原创 2019-08-13 19:22:01 · 373 阅读 · 0 评论 -
HDU -1303 Doubles
DoublesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionAs part of an arithmetic competency program, your students will be given randomly ge...原创 2019-08-13 19:33:50 · 390 阅读 · 0 评论 -
HDU -2199 Can you solve this equation?(二分)
Can you solve this equation?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionNow,given the equation 8x^4 + 7x^3 + 2x^2 + 3x + 6 == Y,can you...原创 2019-08-13 19:42:15 · 451 阅读 · 0 评论 -
POJ -3122 Pie(二分)
PieTime Limit: 1000MSMemory Limit: 65536KDescriptionMy birthday is coming up and traditionally I’m serving pie. Not just one pie, no, I have a number N of them, of various tastes and of var...原创 2019-08-13 20:02:37 · 355 阅读 · 0 评论 -
POJ -2002 Squares(二分,几何问题)
SquaresTime Limit: 3500MSMemory Limit: 65536KDescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that ...原创 2019-08-13 20:15:58 · 480 阅读 · 0 评论 -
POJ -3061 Subsequence(尺取法)
SubsequenceTime Limit: 1000MSMemory Limit: 65536KDescriptionA sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S &l...原创 2019-08-13 20:35:07 · 361 阅读 · 0 评论 -
POJ -2566 Bound Found(尺取法,前缀和)
Bound FoundTime Limit: 5000MSMemory Limit: 65536KDescriptionSignals of most probably extra-terrestrial origin have been received and digitalized by The Aeronautic and Space Administration (...原创 2019-08-14 08:55:40 · 316 阅读 · 0 评论 -
POJ -2387 Til the Cows Come Home(Dijkstra,Bellman-Ford)
Til the Cows Come HomeTime Limit: 1000MSMemory Limit: 65536KDescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes...原创 2019-08-19 16:17:22 · 296 阅读 · 0 评论 -
Dijkstra 模板+标记路径
#include <iostream>#include <algorithm>#include <cstdlib>#include <cstring>#include <cmath>#include <cstdio>#include <queue>#include <set>using ...原创 2019-08-19 16:42:00 · 326 阅读 · 0 评论 -
HDU-3790 最短路径问题(Bellman-Ford)
最短路径问题Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,...原创 2019-08-19 19:06:45 · 254 阅读 · 0 评论 -
Bellman-Ford 模板+路径标记
#include <iostream>#include <algorithm>#include <cstdlib>#include <cstring>#include <cmath>#include <cstdio>#include <queue>#include <set>using ...原创 2019-08-19 19:14:41 · 284 阅读 · 0 评论 -
Floyd 模板
Floyd算法适用于多源的情况,用dis[st][en]就可以轻松的查询st到en的最短长度。具体原理我也不太懂,记住模板就行参考链接:https://blog.csdn.net/qq_35644234/article/details/60875818#include <iostream>#include <algorithm>#include <cstdl...原创 2019-08-19 20:01:42 · 331 阅读 · 0 评论 -
HDU -5672 String(尺取法)
StringTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionThere is a string S.S only contain lower case English character.(10≤length(S)≤1,000,0...原创 2019-08-14 19:48:24 · 518 阅读 · 0 评论 -
POJ -2100 Graveyard Design(尺取法)
Graveyard DesignTime Limit: 10000MSMemory Limit: 64000KDescriptionKing George has recently decided that he would like to have a new design for the royal graveyard. The graveyard must consis...原创 2019-08-14 20:00:01 · 338 阅读 · 0 评论 -
HDU -1551 Cable master(二分)
Cable masterTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionInhabitants of the Wonderland have decided to hold a regional programming conte...原创 2019-08-14 20:22:17 · 337 阅读 · 0 评论 -
POJ -2549 Sumsets(二分,枚举)
SumsetsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13364 Accepted: 3668DescriptionGiven S, a set of integers, find the largest d such that a + b + c = d where a, b, c, and d are di...原创 2019-08-14 20:36:22 · 345 阅读 · 0 评论 -
POJ -2739 Sum of Consecutive Prime Numbers(尺取法)
Sum of Consecutive Prime NumbersTime Limit: 1000MSMemory Limit: 65536KDescriptionSome positive integers can be represented by a sum of one or more consecutive prime numbers. How many such r...原创 2019-08-14 20:42:41 · 348 阅读 · 0 评论 -
POJ -2318 TOYS(差积判断点与直线位置)
TOYSTime Limit: 2000MSMemory Limit: 65536KDescriptionCalculate the number of toys that land in each bin of a partitioned toy box.Mom and dad have a problem - their child John never puts hi...原创 2019-08-23 16:48:36 · 197 阅读 · 0 评论 -
CodeForces -1037B 达到中位数
题目链接:http://codeforces.com/problemset/problem/1037/BB. Достигнуть медианыограничение по времени на тест1 секундаограничение по памяти на тест256 мегабайтвводстандартный вводвыводстандартный выво...原创 2019-08-14 20:56:34 · 1954 阅读 · 0 评论 -
HDU -2201 熊猫阿波的故事
熊猫阿波的故事Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description凡看过功夫熊猫这部电影的人都会对影片中那只憨憨的熊猫阿波留下相当深的印象,胖胖的熊猫阿波自从打败了凶狠强悍的雪豹泰龙以后,在和平谷的地位是越来越高,成为谷中第一的功夫大...原创 2019-08-14 23:00:31 · 407 阅读 · 0 评论 -
POJ -3268 Silver Cow Party(Dijkstra,置换矩阵)
Silver Cow PartyTime Limit: 2000MSMemory Limit: 65536KDescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1…N is going to attend the big cow party to be held at far...原创 2019-08-20 09:03:01 · 239 阅读 · 0 评论 -
HDU -1827 Summer Holiday(Tarjan,缩点)
Summer HolidayTime Limit: 10000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionTo see a World in a Grain of SandAnd a Heaven in a Wild Flower,Hold Infini...原创 2019-08-23 19:19:56 · 190 阅读 · 0 评论 -
CodeForces -939A 三角恋爱
题目链接:http://codeforces.com/problemset/problem/939/AA. Любовный треугольникограничение по времени на тест1 секундаограничение по памяти на тест256 мегабайтвводстандартный вводвыводстандартный выв...原创 2019-08-15 08:56:43 · 1875 阅读 · 0 评论 -
ZOJ -2095 Divisor Summation
Divisor SummationTime Limit: 5 SecondsMemory Limit: 32768 KBGive a natural number n (1 <= n <= 500000), please tell the summation of all its proper divisors.Definition: A proper divis...原创 2019-08-15 09:03:57 · 460 阅读 · 0 评论