
ACM之路
文章平均质量分 81
ACM这条路不好走,但还是有很多人走在这条路上。这里有我做过的题目,有我的所见,所感,所想,有我的ACM之路。
同学少年
没有什么不可能!
展开
-
[ACM] SDUT 2886 Weighted Median (省赛最悲剧的一道题)
Weighted MedianTime Limit: 2000ms Memory limit: 65536K 有疑问?点这里^_^题目描述For n elements x1, x2, ..., xn with positive integer weights w1, w2, ..., wn. The weighted median is the原创 2014-11-04 21:29:37 · 3739 阅读 · 8 评论 -
[ACM] HDU 5086 Revenge of Segment Tree(所有连续区间的和)
Revenge of Segment TreeProblem DescriptionIn computer science, a segment tree is a tree data structure for storing intervals, or segments. It allows querying which of the stored segments c原创 2014-11-02 10:20:51 · 2369 阅读 · 0 评论 -
[ACM] POJ 3686 The Windy's (二分图最小权匹配,KM算法,特殊建图)
The Windy'sTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 4158 Accepted: 1777DescriptionThe Windy's is a world famous toy factory that owns M top-cla原创 2014-11-01 14:02:17 · 2511 阅读 · 0 评论 -
[ACM] HDU 1533 Going Home (二分图最小权匹配,KM算法)
Going HomeTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2963 Accepted Submission(s): 1492Problem DescriptionOn a grid map th原创 2014-10-31 20:33:14 · 2027 阅读 · 0 评论 -
[ACM] HDU 3395 Special Fish (二分图最大权匹配,KM算法)
Special FishProblem DescriptionThere is a kind of special fish in the East Lake where is closed to campus of Wuhan University. It’s hard to say which gender of those fish are, because ever原创 2014-10-31 10:54:11 · 1809 阅读 · 0 评论 -
[ACM] HDU 2255 奔小康赚大钱 (二分图最大权匹配,KM算法)
奔小康赚大钱Problem Description传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。另一方面,村长和另外的村领导希望得到最大的效益,原创 2014-10-31 10:26:59 · 2022 阅读 · 0 评论 -
[ACM] HDU 2063 过山车 (二分图,匈牙利算法)
过山车Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11509 Accepted Submission(s): 5066Problem DescriptionRPG girls今天和大家一起去游乐场玩,终原创 2014-10-30 20:39:06 · 3048 阅读 · 1 评论 -
[ACM] POJ 2342 Anniversary party (树形DP入门题)
Anniversary partyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4410 Accepted: 2496DescriptionThere is going to be a party to celebrate the 80-th Ann原创 2014-10-28 11:27:54 · 3577 阅读 · 3 评论 -
[ACM] HDU 5083 Instruction (模拟)
InstructionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 347 Accepted Submission(s): 101Problem Description Nowadays, Jim G原创 2014-10-26 09:35:56 · 1724 阅读 · 0 评论 -
[ACM] HDU 5078 Osu!
Osu!Problem DescriptionOsu! is a very popular music game. Basically, it is a game about clicking. Some points will appear on the screen at some time, and you have to click them at a correct原创 2014-10-23 10:38:28 · 1790 阅读 · 0 评论 -
[ACM] HDU 5074 Hatsune Miku (简单DP)
Hatsune MikuProblem DescriptionHatsune Miku is a popular virtual singer. It is very popular in both Japan and China. Basically it is a computer software that allows you to compose a song on yo原创 2014-10-23 10:23:58 · 2483 阅读 · 0 评论 -
[ACM] FZU 2092 收集水晶 (DFS,记忆化搜索)
Problem Descriptionshadow来到一片神奇的土地,这片土地上不时会出现一些有价值的水晶,shadow想要收集一些水晶带回去,但是这项任务太繁杂了,于是shadow让自己的影子脱离自己并成为一个助手来帮助自己收集这些水晶。shadow把这片土地划分成n*m个小方格,某些格子会存在一些shadow和他的影子都无法穿越的障碍,比如巨石、树木、野兽等。shadow预先探测到原创 2014-10-22 11:13:37 · 1908 阅读 · 0 评论 -
[ACM] HDU 5025 Saving Tang Monk (状态压缩,BFS)
Saving Tang MonkTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 941 Accepted Submission(s): 352Problem Description《Journey to t原创 2014-10-21 22:12:12 · 2683 阅读 · 0 评论 -
[ACM] POJ 1088 滑雪 (记忆化搜索复习)
滑雪Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 77763 Accepted: 28905DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或原创 2014-10-20 21:28:38 · 1748 阅读 · 0 评论 -
[ACM] FZU 2087 统计数边 (有多少边至少存在一个最小生成树里面)
Problem Description在图论中,树:任意两个顶点间有且只有一条路径的图。生成树:包含了图中所有顶点的一种树。最小生成树:对于连通的带权图(连通网)G,其生成树也是带权的。生成树T各边的权值总和称为该树的权,权最小的生成树称为G的最小生成树(Minimum Spanning Tree)。最小生成树可简记为MST。但是,对于一个图而言,最小生成树并不是唯一的。现原创 2014-10-19 11:11:37 · 2373 阅读 · 0 评论 -
[ACM] FZU 2086 餐厅点餐 (枚举)
roblem DescriptionJack最近喜欢到学校餐厅吃饭,好吃干净还便宜。在学校餐厅,有a种汤,b种饭,c种面条,d种荤菜,e种素菜。为了保证膳食搭配,Jack每顿饭都会点1~2样荤菜,1~2样素菜(不重复)。同时,在Jack心情好的时候,会点一样饭,再配上一种汤。在心情不好的时候,就只吃一种面条。因为经济有限,Jack每次点餐的总价在min~max之间。Jack想知原创 2014-10-19 09:48:59 · 2534 阅读 · 0 评论 -
[ACM] ZOJ 3819 Average Score (水题)
Average ScoreTime Limit: 2 Seconds Memory Limit: 65536 KBBob is a freshman in Marjar University. He is clever and diligent. However, he is not good at math, especially in Mathematical A原创 2014-10-14 20:42:41 · 1834 阅读 · 0 评论 -
[ACM] HDU 5024 Wang Xifeng's Little Plot (构造,枚举)
Wang Xifeng's Little PlotProblem Description《Dream of the Red Chamber》(also 《The Story of the Stone》) is one of the Four Great Classical Novels of Chinese literature, and it is commonly原创 2014-10-14 20:38:21 · 1590 阅读 · 0 评论 -
[ACM] HDU 1400 Mondriaan's Dream (状态压缩,长2宽1长方形铺满)
Mondriaan's DreamTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 783 Accepted Submission(s): 506Problem Description Squares原创 2014-10-10 09:08:36 · 1844 阅读 · 0 评论 -
[ACM] HDU 1227 Fast Food (经典Dp)
Fast FoodTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2173 Accepted Submission(s): 930Problem DescriptionThe fastfood chain原创 2014-10-09 15:35:04 · 2772 阅读 · 0 评论 -
[ACM] FZU 1686 神龙的难题 (DLX 重复覆盖)
Problem 1686 神龙的难题Accept: 444 Submit: 1365Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description这是个剑与魔法的世界.英雄和魔物同在,动荡和安定并存.但总的来说,库尔特王国是个安宁的国家,人民安居乐业,魔物也比较少.但是.总有一些魔物不时会进原创 2014-10-07 16:24:09 · 2275 阅读 · 0 评论 -
[ACM] HDU 2295 Radar (二分+DLX 重复覆盖)
RadarTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2593 Accepted Submission(s): 1012Problem Description N cities of the Jav原创 2014-10-07 14:04:40 · 2382 阅读 · 0 评论 -
[ACM] ZOJ 3209 Treasure Map ( Dancing Links 精确覆盖,矩形覆盖)
Treasure MapTime Limit: 2 Seconds Memory Limit: 32768 KBYour boss once had got many copies of a treasure map. Unfortunately, all the copies are now broken to many rectangular pieces, an原创 2014-10-04 13:02:35 · 2725 阅读 · 0 评论 -
[ACM] POJ 3740 Easy Finding (DFS)
Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16202 Accepted: 4349DescriptionGiven a M×N matrix A. Aij ∈ {0, 1} (0 ≤ i < M, 0 ≤ j < N), could you find some ro原创 2014-10-03 20:44:32 · 1590 阅读 · 0 评论 -
[ACM] POJ 3740 Easy Finding (DLX模板题)
Easy FindingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16178 Accepted: 4343DescriptionGiven a M×N matrix A. Aij ∈ {0, 1} (0 ≤ i < M, 0 ≤ j < N), co原创 2014-10-03 17:23:48 · 1580 阅读 · 1 评论 -
[ACM] HUST 1017 Exact cover (Dancing Links,DLX模板题)
DESCRIPTIONThere is an N*M matrix with only 0s and 1s, (1 INPUTThere are multiply test cases. First line: two integers N, M; The following N lines: Every line first comes an integer C(1 <= C <= 100),原创 2014-10-03 17:11:57 · 2226 阅读 · 0 评论 -
hiho模拟面试题2 补提交卡 (贪心,枚举)
题目:时间限制:2000ms单点时限:1000ms内存限制:256MB描述小Ho给自己定了一个宏伟的目标:连续100天每天坚持在hihoCoder上提交一个程序。100天过去了,小Ho查看自己的提交记录发现有N天因为贪玩忘记提交了。于是小Ho软磨硬泡、强忍着小Hi鄙视的眼神从小Hi那里要来M张"补提交卡"。每张"补提交卡"都可以补回一天的提交,将原创 2014-10-02 15:11:56 · 2569 阅读 · 0 评论 -
[ACM] hdu 5045 Contest (状态压缩Dp)
ContestProblem DescriptionIn the ACM International Collegiate Programming Contest, each team consist of three students. And the teams are given 5 hours to solve between 8 and 12 programming pr原创 2014-10-01 15:32:29 · 1740 阅读 · 0 评论 -
[ACM] POJ 3254 Corn Fields(状态压缩)
Corn FieldsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 8062 Accepted: 4295DescriptionFarmer John has purchased a lush new rectangular pasture compos原创 2014-10-01 10:48:00 · 1758 阅读 · 0 评论 -
[ACM] ZOJ 3816 Generalized Palindromic Number (DFS,暴力枚举)
Generalized Palindromic NumberTime Limit: 2 Seconds Memory Limit: 65536 KBA number that will be the same when it is written forwards or backwards is known as a palindromic number. For e原创 2014-09-28 11:18:03 · 1859 阅读 · 0 评论 -
[ACM] poj 1236 Network of Schools (有向强连通分量)
Network of SchoolsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11407 Accepted: 4539DescriptionA number of schools are connected to a computer netwo原创 2014-09-25 17:30:16 · 1897 阅读 · 0 评论 -
[ACM] POJ 2186 Popular Cows (强连通分量,Kosaraju算法知识整理)
首先是一些知识整理:来源于网络:以下转载于:http://blog.sina.com.cn/s/blog_4dff87120100r58c.html Kosaraju算法是求解有向图强连通分量(strong connectedcomponent)的三个著名算法之一,能在线性时间求解出一个图的强分量。什么是强连通分量?在这之前先定义一个强连通性(strong connectivi原创 2014-09-25 16:10:47 · 2823 阅读 · 0 评论 -
[ACM] POJ 1273 Drainage Ditches (最大流)
Drainage DitchesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 56869 Accepted: 21862DescriptionEvery time it rains on Farmer John's fields, a pond fo原创 2014-09-25 08:57:10 · 2424 阅读 · 0 评论 -
[ACM] hdu 3549 Flow Problem (最大流模板题)
Flow ProblemProblem DescriptionNetwork flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted directed graph.原创 2014-09-24 17:12:56 · 3120 阅读 · 0 评论 -
[ACM] hdu 5038 Grade
GradeProblem DescriptionTed is a employee of Always Cook Mushroom (ACM). His boss Matt gives him a pack of mushrooms and ask him to grade each mushroom according to its weight. Suppose the原创 2014-09-22 09:03:02 · 2491 阅读 · 0 评论 -
[ACM] POJ 3233 Matrix Power Series (求矩阵A+A^2+A^3...+A^k,二分求和或者矩阵转化)
Matrix Power SeriesTime Limit: 3000MS Memory Limit: 131072KTotal Submissions: 15417 Accepted: 6602DescriptionGiven a n × n matrix A and a positive integer k,原创 2014-09-18 12:19:05 · 3724 阅读 · 2 评论 -
[ACM] POJ 3070 Fibonacci (矩阵幂运算)
FibonacciTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9517 Accepted: 6767DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = F原创 2014-09-18 09:45:21 · 2309 阅读 · 0 评论 -
[ACM] hdu 5001 Walk (概率DP)
WalkProblem DescriptionI used to think I could be anything, but now I know that I couldn't do anything. So I started traveling.The nation looks like a connected bidirectional graph, and原创 2014-09-17 17:23:32 · 1828 阅读 · 0 评论 -
[ACM] hdu 4403 A very hard Aoshu problem (DFS暴搜数字)
A very hard Aoshu problemProblem DescriptionAoshu is very popular among primary school students. It is mathematics, but much harder than ordinary mathematics for primary school students. T原创 2014-09-11 14:53:27 · 2662 阅读 · 1 评论 -
[ACM] zoj 3809 The Himalayas (2014 ACMICPC Regional 牡丹江站网络赛 A题)
he HimalayasTime Limit: 2 Seconds Memory Limit: 65536 KBAs an artist, Bob usually need to travel around the world. He made a lot of sketch of scenery on his journey. A famous spot he ha原创 2014-09-09 09:17:58 · 2656 阅读 · 0 评论