03 2017 档案

摘要:Time Limit: 1000MS Memory Limit: 10000K Description 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用 阅读全文
posted @ 2017-03-31 22:44 Dilthey 阅读(274) 评论(0) 推荐(0)
摘要:引用来自http://www.cnblogs.com/iiyiyi/p/4738644.html的思路: 【题目大意】 给出C头奶牛的SAT成绩和申请奖学金,选出N头牛,使得总奖学金在≤F的情况下奶牛SAT成绩的中位数最大。 【思路】 假设before[i]表示前i头奶牛中n/2头奶牛奖学金总额的最 阅读全文
posted @ 2017-03-30 22:15 Dilthey 阅读(210) 评论(0) 推荐(0)
摘要:题目链接:http://poj.org/problem?id=3614 Time Limit: 1000MS Memory Limit: 65536K Description To avoid unsightly burns while tanning, each of the C (1 ≤ C ≤ 阅读全文
posted @ 2017-03-29 21:49 Dilthey 阅读(223) 评论(0) 推荐(0)
摘要:因为在允许的情况下,必然是左右手交替进行,这样不会增加多余的无谓的能量。 然后根据不同的分界点,肯定会产生左手或右手重复使用的情况,这是就要加上Qr/Ql * 次数。 一开始的想法,很直接,枚举每个分界点,计算出总共要用的能量,取最小的那个即是答案: 但是在数据来那个很大的情况下会超时。 所以考虑到 阅读全文
posted @ 2017-03-26 10:28 Dilthey 阅读(203) 评论(0) 推荐(0)
摘要:依然是非常暴力的DFS,1~n这n个数字,全排列一遍,找到第一个符合的排列就是答案。 阅读全文
posted @ 2017-03-24 10:12 Dilthey 阅读(105) 评论(0) 推荐(0)
摘要:题目链接:http://poj.org/problem?id=3050 超级大水题,一次过…… 以5*5的map的某一格 ( i , j ) 为起点,dfs到deep=6,直接把得到的那个数字插入到set容器里(set容器保证每个元素不重复), 然后 i=1 to 5 { j = 1 to 5{.. 阅读全文
posted @ 2017-03-23 21:26 Dilthey 阅读(200) 评论(0) 推荐(0)
摘要:题目链接:http://poj.org/problem?id=1753 Time Limit: 1000MS Memory Limit: 65536K Description Flip game is played on a rectangular 4x4 field with two-sided 阅读全文
posted @ 2017-03-23 15:44 Dilthey 阅读(183) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 int dx[4]={+1,0,-1,0}; 6 int dy[4]={0,+1,0,-1}; 7 struct type{ 8 int x,y,t; 9 }meteor[50000+5],now,next; 10 int n,map[305][305],... 阅读全文
posted @ 2017-03-21 22:26 Dilthey 阅读(296) 评论(0) 推荐(0)
摘要:“.”能走,“#”不能走,“@”为起点,求所有能走到的地方。 BFS: DFS: 阅读全文
posted @ 2017-03-20 22:13 Dilthey 阅读(139) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1372 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Descripti 阅读全文
posted @ 2017-03-20 20:39 Dilthey 阅读(155) 评论(0) 推荐(0)
摘要:time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output time limit per test 2 seconds time limit 阅读全文
posted @ 2017-03-19 21:02 Dilthey 阅读(190) 评论(0) 推荐(0)
摘要:题目大意:题目很长哈,简单来说,数轴上有n个石子,第i个石头的坐标为Di,现在要从0跳到L,每次条都从一个石子跳到相邻的下一个石子。现在FJ允许你移走M个石子,问移走这M个石子后,相邻两个石子距离的最小值的最大值是多少,因为移动有很多种方法,每一种有一个最小值距离,这些最小值里面的最大值(我之所以解释最后一句,是因为我兄弟他没懂--其实不是我翻译的,嘿嘿)。 思路:在这里二分的对象当然是距离咯... 阅读全文
posted @ 2017-03-16 22:27 Dilthey 阅读(151) 评论(0) 推荐(0)
摘要:和HDU 1789 - Doing Homework again一个套路 阅读全文
posted @ 2017-03-16 21:45 Dilthey 阅读(222) 评论(0) 推荐(0)
摘要:Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5505 Accepted Submission(s): 1320 Problem Descr 阅读全文
posted @ 2017-03-14 22:58 Dilthey 阅读(235) 评论(0) 推荐(0)
摘要:time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output time limit per test 5 seconds time limit 阅读全文
posted @ 2017-03-13 23:08 Dilthey 阅读(326) 评论(0) 推荐(0)
摘要:time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output time limit per test 2 seconds time limit 阅读全文
posted @ 2017-03-13 22:57 Dilthey 阅读(287) 评论(0) 推荐(0)
摘要:Description Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,... 阅读全文
posted @ 2017-03-13 12:32 Dilthey 阅读(182) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1789 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Descripti 阅读全文
posted @ 2017-03-09 23:21 Dilthey 阅读(300) 评论(0) 推荐(0)
摘要:Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating 阅读全文
posted @ 2017-03-09 16:25 Dilthey 阅读(196) 评论(0) 推荐(0)
摘要:Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13982 Accepted: 5349 Description A group of N people wishes to go across a river with only 阅读全文
posted @ 2017-03-08 22:26 Dilthey 阅读(198) 评论(0) 推荐(0)
摘要:Problem Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15 阅读全文
posted @ 2017-03-06 21:55 Dilthey 阅读(138) 评论(0) 推荐(0)
摘要:time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output time limit per test 2 seconds time limit 阅读全文
posted @ 2017-03-03 23:39 Dilthey 阅读(234) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2602 Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man lik 阅读全文
posted @ 2017-03-03 15:16 Dilthey 阅读(210) 评论(0) 推荐(0)
摘要:Problem Description 穿过幽谷意味着离大魔王lemon已经无限接近了!可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑!可怜的yifenfei为了去救MM,义无 阅读全文
posted @ 2017-03-03 12:42 Dilthey 阅读(189) 评论(0) 推荐(0)
摘要:题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=2955 Problem Description The aspiring Roy the Robber has seen a lot of American movies, and knows 阅读全文
posted @ 2017-03-03 08:43 Dilthey 阅读(180) 评论(0) 推荐(0)
摘要:Problem Description 在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的: 有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少? 已经告诉你了,这是个DP的题目,你能AC吗? Input 输入数据首先包括一个整数C,表示 阅读全文
posted @ 2017-03-02 00:03 Dilthey 阅读(186) 评论(0) 推荐(0)
摘要:Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7 阅读全文
posted @ 2017-03-01 23:21 Dilthey 阅读(158) 评论(0) 推荐(0)
摘要:Largest Rectangle in a Histogram Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 17635 Accepted 阅读全文
posted @ 2017-03-01 22:28 Dilthey 阅读(194) 评论(0) 推荐(0)