ACM
文章平均质量分 82
丶先森
这个作者很懒,什么都没留下…
展开
-
C. Alyona and the Tree
C. Alyona and the Treetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlyona decided to go on a diet and we原创 2017-02-17 19:41:52 · 339 阅读 · 0 评论 -
A. Magical Boxes
A. Magical Boxestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEmuskald is a well-known illusionist. One原创 2017-02-17 19:44:44 · 264 阅读 · 0 评论 -
B. I.O.U.
B. I.O.U.time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputImagine that there is a group of three friends: A,原创 2017-01-21 21:45:20 · 239 阅读 · 0 评论 -
E. A rectangle
Developing tools for creation of locations maps for turn-based fights in a new game, Petya faced the following problem.A field map consists of hexagonal cells. Since locations sizes are going to b原创 2017-01-21 23:38:05 · 356 阅读 · 0 评论 -
B. Unary
B. Unarytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputUnary is a minimalistic Brainfuck dialect in which原创 2017-01-25 12:15:09 · 244 阅读 · 0 评论 -
The Child and Set
B. The Child and Settime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAt the children's day, the child came t原创 2017-01-25 12:13:42 · 330 阅读 · 0 评论 -
Partitioning by Palindromes
题目大意:给你 T 组字符串 str,问你每个字符串的子字符串是回文串的最小个数 数据范围:1 涉及算法:DP(动态规划) 动态规划算法通常基于一个递推公式及一个或多个初始状态,当前子问题的解将由上一 次子问题的解推出,使用动态规划来解题只需要多项式时间复杂度,因此他比回溯法,暴力 法等要快许多 大致思路是: 1.要先找到初状态和末状态,通过原创 2017-01-25 12:21:09 · 262 阅读 · 0 评论 -
Soldier and Number Game
D. Soldier and Number Gametime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo soldiers are playing a game.原创 2017-01-25 12:22:16 · 253 阅读 · 0 评论 -
HDU2087剪花布条
剪花布条Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19173 Accepted Submission(s): 12054Problem Description一块花布条,里面有些图案,另有一块直接可用的小原创 2017-03-17 22:52:49 · 160 阅读 · 0 评论 -
C. Dima and Salad
C. Dima and Saladtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDima, Inna and Seryozha have gathered in a原创 2017-03-08 23:29:13 · 244 阅读 · 0 评论 -
B. Chamber of Secrets
B. Chamber of Secretstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output"The Chamber of Secrets has been open原创 2017-03-08 23:53:45 · 579 阅读 · 0 评论 -
D. Remainders Game(最小公倍数,最大公约数模板)
B. Remainders Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday Pari and Arya are playing a game ca转载 2017-03-18 23:30:19 · 368 阅读 · 0 评论 -
POJ3660Cow Contest(floyed算法模板)
Cow ContestTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11015 Accepted: 6128DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are particip原创 2017-03-27 21:56:56 · 341 阅读 · 0 评论 -
POJ3661running
RunningTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6818 Accepted: 2532DescriptionThe cows are trying to become better athletes, so Bessie is running原创 2017-03-24 10:10:13 · 290 阅读 · 0 评论 -
POJ3665iCow
iCowTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6397 Accepted: 2332DescriptionFatigued by the endless toils of farming, Farmer John has decided to t原创 2017-04-06 22:18:48 · 239 阅读 · 0 评论 -
Ivan and Powers of Two
Ivan has got an array of n non-negative integers a1, a2, ..., an. Ivan knows that the array is sorted in the non-decreasing order.Ivan wrote out integers 2a1, 2a2, ..., 2an on a piece of paper.原创 2017-03-12 23:31:59 · 222 阅读 · 0 评论 -
A1. Oh Sweet Beaverette
A1. Oh Sweet Beaverettetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output— Oh my sweet Beaverette, would you fancy a walk along a原创 2017-03-12 23:44:51 · 295 阅读 · 0 评论 -
LightOJ - 1422 Halloween Costumes(区间DP模板)
B - Halloween Costumes LightOJ - 1422 a题目大意:给你n个数,每个数意味着一件衣服,你可以套多件衣服,但是一旦脱下来某件衣服,之后要是遇到这件衣服,必须重新穿一个新的,一共至少穿几个衣服解题思路:这道题是个区间DP,区间DP一般有三层循环,第一层循环是区间的长度,第二层循环是区间头尾位置,第三层循环是在区间中找个中间值比较求极值原创 2017-04-08 16:09:01 · 528 阅读 · 0 评论 -
POJ2955Brackets(区间DP模板题)
BracketsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7556 Accepted: 4020DescriptionWe give the following inductive definition of a “regular bracket原创 2017-04-08 16:16:02 · 263 阅读 · 0 评论 -
POJ1651Multiplication Puzzle(区间dp)
Multiplication PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9836 Accepted: 6083DescriptionThe multiplication puzzle is played with a row of car原创 2017-04-08 16:53:00 · 204 阅读 · 0 评论 -
The Accomodation of Students(匈牙利算法+二分图染色判别模板)
The Accomodation of StudentsTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6089 Accepted Submission(s): 2771Problem DescriptionT原创 2017-03-17 22:48:26 · 189 阅读 · 0 评论 -
POJ - 1195 Mobile phones(二位树状数组模版)
Mobile phonesTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 19323 Accepted: 8917DescriptionSuppose that the fourth generation mobile phone base station原创 2017-03-17 22:56:07 · 170 阅读 · 0 评论 -
HDU1686(KMP多次匹配)
OulipoTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12783 Accepted Submission(s): 5025Problem DescriptionThe French author Geor原创 2017-03-16 22:34:22 · 436 阅读 · 0 评论 -
Asteroids(二分图匹配)
Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The grid contains K asteroids (1 <= K <= 10,000), which are conveniently locate原创 2017-03-10 23:52:55 · 227 阅读 · 0 评论 -
B. Maximal Area Quadrilateral(叉积模板)
B. Maximal Area Quadrilateraltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub has drawn a set of n poi原创 2017-03-08 23:45:22 · 257 阅读 · 0 评论 -
POJ2352-Stars(树状数组模板)
StarsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 46056 Accepted: 19877DescriptionAstronomers often examine star maps where stars are represented by原创 2017-03-08 23:36:52 · 193 阅读 · 0 评论 -
Soldier and Number Game--筛素数
D. Soldier and Number Gametime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo soldiers are playing a game.原创 2017-01-25 12:00:33 · 225 阅读 · 0 评论 -
POJ1985Cow Marathon(求树的直径模板)
Cow MarathonTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 5253 Accepted: 2574Case Time Limit: 1000MSDescriptionAfter heari原创 2017-03-02 23:49:05 · 225 阅读 · 0 评论 -
HDU3410 Passing the Message(单调队列模板)
Passing the MessageTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 715 Accepted Submission(s): 471Problem DescriptionWhat a sunny d原创 2017-03-02 23:45:56 · 267 阅读 · 0 评论 -
E. Anton and Tree(缩点+树直径模板)
E. Anton and Treetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAnton is growing a tree in his garden. In原创 2017-03-01 23:58:59 · 496 阅读 · 0 评论 -
POJ-2823Sliding Window(单调队列模板)
Sliding WindowTime Limit: 12000MS Memory Limit: 65536KTotal Submissions: 58321 Accepted: 16711Case Time Limit: 5000MSDescriptionAn array of size n ≤ 106 i原创 2017-03-01 23:57:23 · 232 阅读 · 0 评论 -
POJ3670Eating Together(LIS最长(非)上升(下降)子序列模板)
Eating TogetherTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6034 Accepted: 2941DescriptionThe cows are so very silly about their dinner partners. The原创 2017-04-10 21:45:40 · 424 阅读 · 0 评论 -
2015-2016 ACM-ICPC Southwestern Europe Regional Contest (SWERC 15) A题Promotions
题目大意:给你一个DAG关于1到(E-1)个数字,然后有一个[A,B]的区间,让你给其中一些人升职,但是升职的前提是需要给他的上级升职,也就是说1->2意味着当你要给2升职的之前,先让他的上级1升职,然后问的是,要想让A个人升职时肯定要升职的人数是多少,让B个人升职肯定升职的人数,然后再输出给即使给B个人升职,也升职不到的人数有几个 解题思路:要想算出肯定升值的人,肯定要找出来有多少原创 2017-03-30 21:37:22 · 1713 阅读 · 0 评论 -
HDU114Piggy-Bank(完全背包模板题)
Piggy-BankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 23622 Accepted Submission(s): 11962Problem DescriptionBefore ACM can do原创 2017-04-01 23:54:39 · 369 阅读 · 0 评论 -
POJ2063Investment
InvestmentTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 10506 Accepted: 3693DescriptionJohn never knew he had a grand-uncle, until he received the not原创 2017-04-01 23:58:36 · 227 阅读 · 0 评论 -
HDU - 1711(KMP模板)
Number SequenceTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25037 Accepted Submission(s): 10598Problem DescriptionGiven two s原创 2017-03-15 23:27:25 · 206 阅读 · 0 评论 -
POJ3668Game of Lines(数学问题)
Game of LinesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7046 Accepted: 2638DescriptionFarmer John has challenged Bessie to the following game: FJ h原创 2017-04-12 20:54:40 · 502 阅读 · 1 评论 -
POJ3669Meteor Shower(bfs)
Meteor ShowerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 19078 Accepted: 4951DescriptionBessie hears that an extraordinary meteor shower is coming;原创 2017-04-12 17:03:49 · 198 阅读 · 0 评论 -
HDU - 1712ACboy needs your help(分组背包模板题)
ACboy needs your helpTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6959 Accepted Submission(s): 3857Problem DescriptionACboy ha原创 2017-04-04 21:50:43 · 332 阅读 · 0 评论 -
HDU - 2159(二维费用背包模板题)
FATETime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13380 Accepted Submission(s): 6327Problem Description最近xhd正在玩一款叫做FATE的游戏,为了得到原创 2017-04-04 21:54:44 · 727 阅读 · 0 评论