ACM
letterwuyu
Linux c c++ python java
分布式存储&消息队列&计算
展开
-
【模拟】hdu5336 XYZ and Drops
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5336题意:水滴游戏,有水珠,水珠size>4时会变成4个水滴流向四方水滴之间流动不相互影响,一个水滴遇到水珠时会融入水珠,水珠size+1,开始给出一个坐标表示在此位置当有一个水珠迸发,求t秒以各个水珠的情况,如果以迸发计算出迸发的时刻,如果没有计算出姿此时水珠的size分析直原创 2015-09-20 21:02:08 · 488 阅读 · 0 评论 -
hdu 4597 Play Game【记忆化搜索】
Play GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 805 Accepted Submission(s): 464Problem DescriptionAlice and Bob are play原创 2015-01-21 13:04:39 · 883 阅读 · 0 评论 -
hdu 2757 Ocean Currents【广度优先搜索】
Ocean CurrentsTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1561 Accepted Submission(s): 516Problem DescriptionFor a boat on a原创 2015-01-20 19:25:52 · 663 阅读 · 0 评论 -
hdu 3277 Marriage Match III【最大流+并查集+二分枚举】
Marriage Match IIITime Limit: 10000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1491 Accepted Submission(s): 440Problem DescriptionPresumably,原创 2015-01-19 11:20:53 · 524 阅读 · 0 评论 -
hdu 3004 The Chess【广独优先搜索】
The ChessTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 466 Accepted Submission(s): 130Problem DescriptionMr Li likes playing ch原创 2015-01-14 19:36:30 · 829 阅读 · 0 评论 -
hdu 3987 Harry Potter and the Forbidden Forest【网路流最小割模型】
Harry Potter and the Forbidden ForestTime Limit: 5000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1549 Accepted Submission(s): 528Problem Descri原创 2014-12-01 21:53:24 · 732 阅读 · 0 评论 -
hdu 2686 Matrix【最大费用流】
MatrixTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1792 Accepted Submission(s): 958Problem DescriptionYifenfei very like play原创 2014-11-26 21:33:26 · 731 阅读 · 0 评论 -
hdu4884 TIANKENG’s rice shop【模拟】
TIANKENG’s rice shopTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 345 Accepted Submission(s): 71Problem DescriptionTIANKENG man原创 2014-11-23 17:39:03 · 814 阅读 · 0 评论 -
hdu 1533 Going Home【最大流最小费用流】
Going HomeTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2987 Accepted Submission(s): 1513Problem DescriptionOn a grid map ther原创 2014-11-16 18:21:50 · 607 阅读 · 0 评论 -
hdu 1429 胜利大逃亡(续)【广度优先搜索+状态压缩】
胜利大逃亡(续)Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5411 Accepted Submission(s): 1863Problem DescriptionIgnatius再次被魔王抓走了(搞不懂他原创 2014-11-15 11:43:58 · 705 阅读 · 0 评论 -
hdu 1495 非常可乐【广度优先搜索】
非常可乐Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5109 Accepted Submission(s): 2060Problem Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是原创 2014-11-15 11:30:56 · 1004 阅读 · 0 评论 -
hdu 1254 推箱子【广度优先搜索】
推箱子Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5318 Accepted Submission(s): 1493Problem Description推箱子是一个很经典的游戏.今天我们来玩一个简单版本.原创 2014-11-09 13:50:55 · 1498 阅读 · 0 评论 -
hdu1195 Open the Lock【广度优先搜索】
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1195原创 2014-11-09 13:28:41 · 569 阅读 · 0 评论 -
hdu 3917 Road constructions【网络流-全闭包】
原文链接:http://acm.hdu.edu.cn/showproblem.php?pid=3917分析:原创 2014-11-07 14:41:46 · 451 阅读 · 0 评论 -
hdu 2485 Destroying the bus stations【网络最大流】
Destroying the bus stationsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2240 Accepted Submission(s): 716Problem DescriptionGab原创 2014-11-03 21:52:56 · 563 阅读 · 0 评论 -
hdu 1241 Oil Deposits【广度优先搜索】
Oil DepositsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12655 Accepted Submission(s): 7359Problem DescriptionThe GeoSurvComp原创 2014-11-03 21:46:37 · 535 阅读 · 0 评论 -
poj 1149 PIGS 【网络最大流】
PIGSTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 16630 Accepted: 7457DescriptionMirko works on a pig farm that consists of M locked pig-houses and Mi原创 2014-10-28 14:20:42 · 440 阅读 · 0 评论 -
hdu 3416 Marriage Match IV 【网络最大流+最短路】
Marriage Match IVTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2170 Accepted Submission(s): 653Problem DescriptionDo not sincer原创 2014-10-27 21:53:18 · 731 阅读 · 0 评论 -
hdu 1558 Segment set【基础带权并查集+计算几何】
Segment setTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3599 Accepted Submission(s): 1346Problem DescriptionA segment and all原创 2015-02-03 18:26:56 · 693 阅读 · 0 评论 -
hdu 3400 Line belt
Line belt Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3023 Accepted Submission(s): 1155Problem DescriptionIn a two-dimensiona原创 2015-03-16 19:20:25 · 452 阅读 · 0 评论 -
poj 3322 Bloxorz I【广度优先搜索】
Bloxorz ITime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5275 Accepted: 1767DescriptionLittle Tom loves playing games. One day he downloads a little com原创 2015-03-23 21:07:48 · 1161 阅读 · 0 评论 -
【遍历枚举】hdu 5288 OO’s Sequence
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5288题意:给出一个序列,计算所有满足:存在ai使的区间内不存在ai的倍数的区间个数和分析:从ai先两端找到不是ai倍数的两个端点了,li,ri。sum(i)=(loc(ai)-li)*(ri-loc(ai));#include#include#include#include原创 2015-09-20 20:43:56 · 494 阅读 · 0 评论 -
hdu 5249 KPI 【二分查找】
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5249分析:这道题是2015百度之星初赛1的4题这道题不算太难当时队友做出来了,不过费了老大劲,其实我从中能够吸取教训的,原因是,我一看这道题就是数据结构的,然后和队友想的一样二分查找,但是从中遇到了一系列的问题:首先储存数据我们不能用带有下标的数组,因为题目中的数据是可删可添的这样原创 2015-06-01 21:11:35 · 1137 阅读 · 0 评论 -
hdu 5246 超级赛亚ACMer
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5246分析:题意就不用说了,这道题是2015百度之星初赛1的第一题,一看就是一道贪心题,关键是如何想出谈心策略,其实要想通两点:1>百小度的战斗力只升不要降,最坏也就是不升2>百小度的潜能值随时间推移逐渐减小想到这两点我们就可以想到贪心策略:我们要尽快的使百小度潜能激发出来,以为原创 2015-06-01 20:29:44 · 853 阅读 · 0 评论 -
poj 1509 Glass Beads【最小表示法】
题目链接:http://poj.org/problem?id=1509题意:题目情节说了一顿,一看就是最小表示法啊,就是给你一个字符串环,找出第i位置使字符串以此为起点是的字典序最小,模板题。献上代码:#include#include#include#includeusing namespace std;const int maxn=20000+10;cha原创 2015-05-27 09:42:35 · 601 阅读 · 0 评论 -
hdu 5247 找连续数【暴力枚举】
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5247分析:这道题是2015百度之星初赛1的2题,当时没看这道题是队友看的,比完以后也做了一下,思路大体都是一样的,就是暴力枚举,因为k这段区间,把每得到一段连续的子区间[x,?],则num[len]++(len=size([x,?]));这样就可以了,最后num数组里就是对应的答案原创 2015-06-01 20:50:02 · 903 阅读 · 0 评论 -
hdu 1688 Sightseeing【最短路,次短路条数】
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1688题意:求最短路和次短路条数如果次短路长度=最短路长度+1这输出次短路条数+最短路条数,否则输出最短路条数分析:这是到模版题,献上模版:#include#include#include#include#include#includeusing namespace st原创 2015-05-25 20:13:24 · 1339 阅读 · 0 评论 -
hdu 1107 武林【模拟】
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1107#include#include#include#includeusing namespace std;const int maxn=2000+10;typedef struct Node{ int x,y; int level,in,out,lift;//门原创 2015-05-25 20:05:10 · 741 阅读 · 0 评论 -
hdu 5234 Happy birthday【动态规划】
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5234题意:给出一个n*m的矩阵和一个整数k,要求从左上角开始只能往右或者往左开始遍历,在途中可以选择加当前位置的数或者不加当前位置的数,求最终加的数的和小于k的最大值。分析:这道题一看就是一般的背包,但是没研究过背包和dp,只是凭这感觉写了状态转移方程,wa了几次A了,感觉dp是个原创 2015-05-25 19:34:17 · 649 阅读 · 0 评论 -
hdu 4768 Flyer【二分】
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4768题意:学校有N个社团,新学期开始之际这N个社团发传单,它们发传单是有规律的,有三个数组A[maxn],B[maxn],C[maxn],第i个设团值发给编号为x的同学,其中x=A[i]+k*C[i]且k为整数,x小于等于B[i];学校学生标号1~2^31,求那个同学收到传单数为奇数和原创 2015-05-07 19:09:13 · 814 阅读 · 0 评论 -
hdu 3807【最大最小定理】
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3870这道题是一道裸的求割问题也即求最大流,但是使用一般网络流这道题会超时,这是这道题的难点,但是鉴于这道题的图的特殊性,可以用最大最小定理来求割,这边是这道题的考察点。推荐诸君看一下最大最小个定理,推荐链接:http://www.doc88.com/p-386772667290.h原创 2015-05-07 18:22:10 · 1072 阅读 · 0 评论 -
hdu 1285 比赛排名 【拓扑排序】
拓扑排序模版题#include#include#include#include#includeusing namespace std;const int maxe=250000+10;const int maxh=500+10;typedef struct Edge{ int to,next;};Edge E[maxe];int hea原创 2015-05-06 21:24:04 · 615 阅读 · 0 评论 -
poj 1417
True LiarsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 2221 Accepted: 685DescriptionAfter having drifted about in a small boat for a couple of days,原创 2015-04-21 23:18:23 · 1084 阅读 · 0 评论 -
poj 2912 Rochambeau【枚举+种类并查集】
RochambeauTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 2092 Accepted: 733DescriptionN children are playing Rochambeau (scissors-rock-cloth) game wi原创 2015-04-21 23:04:10 · 548 阅读 · 0 评论 -
hdu 3367 Pseudoforest【伪森林】
PseudoforestTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1929 Accepted Submission(s): 745Problem DescriptionIn graph theory,原创 2015-04-10 00:38:33 · 848 阅读 · 0 评论 -
hdu 4119 Isabella's Message 【字符串处理】
Isabella's MessageTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2098 Accepted Submission(s): 614Problem DescriptionIsabella and原创 2015-04-10 00:18:42 · 950 阅读 · 0 评论 -
poj 1182食物链【种类并查集】
食物链Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 49310 Accepted: 14382Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都原创 2015-04-09 22:46:18 · 514 阅读 · 0 评论 -
hdu 2489 Minimal Ratio Tree【深搜+最小生成树】
Minimal Ratio TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2849 Accepted Submission(s): 849Problem DescriptionFor a tree,原创 2015-03-23 21:37:22 · 570 阅读 · 0 评论 -
hdu 1426 Sudoku Killer【深度优先搜索】
Sudoku KillerTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4161 Accepted Submission(s): 1308Problem Description自从2006年3月10日至11日原创 2014-10-26 14:34:56 · 421 阅读 · 0 评论