随笔分类 - HDU_ACM
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5281 贪心题目,但是看看我的博客里边相关贪心的题解实在是少的可怜,这里就写出来供大家一起探讨。题意还是比较好理解的,这里有一个小小的坑点:枪的数量,和怪物的数量,不一定是相等的,所以我们这里要特殊处理一
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2111 好久不刷题,拿到水题切了切,,,,,题意刚开始都没有理解,,,,真是弱了,,,, 简单贪心,,,,注意分割后的价值和对应的体积成正比 1 #include <stdio.h> 2 #include
阅读全文
摘要:Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离...
阅读全文
摘要:Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N...
阅读全文
摘要:Problem Description自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知...
阅读全文
摘要:Problem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rec...
阅读全文
摘要:http://www.acmerblog.com/topological-sorting-5896.html
阅读全文
摘要:Problem Description有N个比赛队(1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace std;11 1...
阅读全文
摘要:Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another ...
阅读全文
摘要:Problem DescriptionThe contest is beginning! While preparing the contest, iSea wanted to print the teams' names separately on a single paper.Unfortuna...
阅读全文
摘要:Problem Description十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。今天,大家选择上机考试,就是一种勇敢(brave)的选择;这个短学期,我们讲的是博弈(ga...
阅读全文
摘要:原文链接:http://blog.polossk.com/201405/c-plus-plus-g-plus-plusG++?首先更正一个概念,C++是一门计算机编程语言,G++不是语言,是一款编译器中编译C++程序的命令而已。那么他们之间的区别是什么?在提交题目中的语言选项里,G++和C++都代表...
阅读全文
摘要:Problem Description We all use cell phone today. And we must be familiar with the intelligent English input method on the cell phone. To be specific,...
阅读全文
摘要:Problem DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the ph...
阅读全文
摘要:实体化代码运行图:实现代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace std;11 12...
阅读全文
摘要:Problem DescriptionA hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.You are to find all...
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/status.php?user=NYNU_WMH&pid=1251&status=5Trie树的基本实现字母树的插入(Insert)、删除( Delete)和查找(Find)都非常简单,用一个一重循环即可,即第i 次循环找到前i 个字母所对应的子...
阅读全文
摘要:Problem Description小时候,因为家里经济困难,小明从未去过游乐场,所以直到现在,他还心存遗憾。最近,杭州刚建了一座游乐场,为了弥补儿时的遗憾,小明带了一笔钱迫不及待地要去体验一番。由于是第一次来到这种地方,小明也不知哪些项目比较好玩,因此他想体验尽可能多的项目。来之前,小明还向朋友...
阅读全文
摘要:Problem Description这依然是关于高富帅小明曾经的故事——尽管身处逆境,但小明一直没有放弃努力,除了搬砖,小明还研究过东方的八卦以及西方的星座,一直试图在命理上找到自己能够逆袭的依据。当这些都失败以后,小明转向了数学研究,希望从中得到一些信息。一天,小明在研究《BestCoder逆袭...
阅读全文
摘要:Problem Description小明天生对数字比较敏感,3岁的时候就能背诵圆周率一百位。现在,小明慢慢长大了,但依然很喜欢数字,最近,他迷上了质数和平方数,并且自己把质数的平方命名为“质方数”。现在,他在研究这样一个问题:距离一个正整数N最接近的质方数是多少?Input输入数据第一行是一个正整...
阅读全文

浙公网安备 33010602011771号