08 2017 档案

摘要:题目链接: http://acm.nyist.net/JudgeOnline/problem.php?pid=1249 描述 某地区发生了地震,灾区已经非常困难,灾民急需一些帐篷、衣物、食品和血浆等物资。可通往灾区的道路到处都是塌方,70%以上的路面损坏,桥梁全部被毁。国家立即启动应急预案,展开史上 阅读全文
posted @ 2017-08-22 16:38 Reqaw 阅读(1745) 评论(0) 推荐(0)
摘要:题目链接: http://acm.nyist.net/JudgeOnline/problem.php?pid=1248 描述 神秘的海洋,惊险的探险之路,打捞海底宝藏,激烈的海战,海盗劫富等等。加勒比海盗,你知道吧?杰克船长驾驶着自己的的战船黑珍珠1号要征服各个海岛的海盜,最后成为海盗王。 这是一个 阅读全文
posted @ 2017-08-22 16:20 Reqaw 阅读(697) 评论(0) 推荐(0)
摘要:题目链接: http://poj.org/problem?id=1426 Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal repre 阅读全文
posted @ 2017-08-21 20:53 Reqaw 阅读(230) 评论(0) 推荐(0)
摘要:题目链接: http://poj.org/problem?id=2253 Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitt 阅读全文
posted @ 2017-08-21 19:57 Reqaw 阅读(630) 评论(0) 推荐(0)
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3790 Problem Description 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。 In 阅读全文
posted @ 2017-08-21 17:47 Reqaw 阅读(1262) 评论(0) 推荐(0)
摘要:题目链接:http://poj.org/problem?id=3278 Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He 阅读全文
posted @ 2017-08-20 16:03 Reqaw 阅读(230) 评论(0) 推荐(0)
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1071 Problem Description Ignatius bought a land last week, but he didn't know the area of the land bec 阅读全文
posted @ 2017-08-18 18:38 Reqaw 阅读(184) 评论(0) 推荐(0)
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1213 Problem Description Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner tim 阅读全文
posted @ 2017-08-18 18:30 Reqaw 阅读(331) 评论(0) 推荐(0)
摘要:题目链接: http://poj.org/problem?id=1611 Description Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized 阅读全文
posted @ 2017-08-18 08:58 Reqaw 阅读(145) 评论(0) 推荐(0)
摘要:题目: Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and on 阅读全文
posted @ 2017-08-18 08:51 Reqaw 阅读(162) 评论(0) 推荐(0)
摘要:题目链接: http://poj.org/problem?id=1258 Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet co 阅读全文
posted @ 2017-08-18 08:44 Reqaw 阅读(271) 评论(0) 推荐(0)
摘要:题目连接: http://poj.org/problem?id=2387 Description Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before 阅读全文
posted @ 2017-08-18 08:38 Reqaw 阅读(423) 评论(0) 推荐(0)
摘要:题目: Description 妈妈每天都要出去买菜,但是回来后,兜里的钱也懒得数一数,到底花了多少钱真是一笔糊涂帐。现在好了,作为好儿子(女儿)的你可以给她用程序算一下了,呵呵。 Input 输入含有一些数据组,每组数据包括菜种(不含空格的字串),数量w(计量单位不论,一律为double型数)和单 阅读全文
posted @ 2017-08-15 23:32 Reqaw 阅读(1031) 评论(0) 推荐(0)
摘要:题目链接: https://acm.zzuli.edu.cn/zzuliacm/problem.php?id=1134 Description 输入一个以回车结束的字符串,它由数字和字母组成,请过滤掉所有非数字字符,然后将数字字符串转换成十进制整数后乘以2输出。 Input 输入一个以回车结束的字符 阅读全文
posted @ 2017-08-15 23:16 Reqaw 阅读(1506) 评论(0) 推荐(0)
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1233 题意描述: 输入n个城镇以及n*(n-1)/2条道路信息 计算并输出将所有城镇连通或者间接连通需要修建的最短道路的总长度 解题思路: 最小生成树问题模板题,使用克鲁斯卡尔算法即可。 AC代码: 阅读全文
posted @ 2017-08-15 15:15 Reqaw 阅读(236) 评论(0) 推荐(0)
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1232 Problem Description 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直 阅读全文
posted @ 2017-08-15 14:53 Reqaw 阅读(179) 评论(0) 推荐(0)
摘要:题目: You are given a 2D board where in some cells there are gold. You want to fill the board with 2 x 1 dominoes such that all gold are covered. You ma 阅读全文
posted @ 2017-08-15 09:27 Reqaw 阅读(399) 评论(0) 推荐(0)
摘要:题目: You run a marriage media. You take some profiles for men and women, and your task is to arrange as much marriages as you can. But after reading th 阅读全文
posted @ 2017-08-15 09:16 Reqaw 阅读(179) 评论(0) 推荐(0)
摘要:题目链接: http://poj.org/problem?id=3041 Description Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N gr 阅读全文
posted @ 2017-08-15 08:58 Reqaw 阅读(218) 评论(0) 推荐(0)
摘要:题目链接: http://poj.org/problem?id=1422 Description Consider a town where all the streets are one-way and each street leads from one intersection to anot 阅读全文
posted @ 2017-08-15 08:46 Reqaw 阅读(222) 评论(0) 推荐(0)
摘要:题目链接: acm.hdu.edu.cn/showproblem.php?pid=1082 题意描述: 给出课程数和学生数,以及每个课有哪些学生上过,问这N个学生能否组成一个委员会,该委员会中每人代表一种课,能否表示完P门课。 解题思路: 二分图最佳完备匹配,也即二分图最大匹配数。 AC代码: #i 阅读全文
posted @ 2017-08-14 23:48 Reqaw 阅读(161) 评论(0) 推荐(0)
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1150 题意描述: A和B两种机器有几种工作模式,而每种工作能在两种机器的不同模式下加工,每换一种工作模式需要重启一次,现在给出每种工作在每种机器下的工作模式,问最少需要重启多少次加工完工作。 解题思路 阅读全文
posted @ 2017-08-14 23:38 Reqaw 阅读(201) 评论(0) 推荐(0)
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2119 解题思路: 处理数据,使用公式最小点覆盖数=最大匹配数,使用匈牙利算法求二分图最大匹配即可。 AC代码: 1 #include<stdio.h> 2 #include<string.h> 3 i 阅读全文
posted @ 2017-08-14 23:29 Reqaw 阅读(143) 评论(0) 推荐(0)
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1068 Problem Description the second year of the university somebody started a study on the romantic re 阅读全文
posted @ 2017-08-14 23:24 Reqaw 阅读(268) 评论(0) 推荐(0)
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2063 解题思路: 二分图最大匹配模板题。 AC代码: 1 #include<stdio.h> 2 int e[1010][1010],match[1010],book[1010],z; 3 int d 阅读全文
posted @ 2017-08-14 23:17 Reqaw 阅读(162) 评论(0) 推荐(0)
摘要:Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group 阅读全文
posted @ 2017-08-11 11:45 Reqaw 阅读(179) 评论(0) 推荐(0)
摘要:题目: Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to fi 阅读全文
posted @ 2017-08-11 11:37 Reqaw 阅读(405) 评论(0) 推荐(0)
摘要:题目: It's time for music! A lot of popular musicians are invited to join us in the music festival. Each of them will play one of their representative s 阅读全文
posted @ 2017-08-11 11:33 Reqaw 阅读(165) 评论(0) 推荐(0)
摘要:题目: The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born ba 阅读全文
posted @ 2017-08-11 11:27 Reqaw 阅读(193) 评论(0) 推荐(0)
摘要:题目: CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yua 阅读全文
posted @ 2017-08-11 11:07 Reqaw 阅读(214) 评论(0) 推荐(0)
摘要:题目: For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether th 阅读全文
posted @ 2017-08-11 10:27 Reqaw 阅读(146) 评论(0) 推荐(0)
摘要:题目: Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as 阅读全文
posted @ 2017-08-11 10:03 Reqaw 阅读(238) 评论(0) 推荐(0)
摘要:题目: Homer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had. Marge: Yeah, what is it? Homer: Take me for exampl 阅读全文
posted @ 2017-08-11 09:45 Reqaw 阅读(203) 评论(0) 推荐(0)
摘要:题目: 人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。 亲和串的定义是这样的:给定两个字 阅读全文
posted @ 2017-08-11 09:33 Reqaw 阅读(346) 评论(0) 推荐(0)
摘要:题目链接: http://poj.org/problem?id=1797 Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he 阅读全文
posted @ 2017-08-09 23:35 Reqaw 阅读(679) 评论(0) 推荐(0)
摘要:题目: BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical co 阅读全文
posted @ 2017-08-09 22:55 Reqaw 阅读(267) 评论(0) 推荐(0)
摘要:题目: 年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要500 阅读全文
posted @ 2017-08-09 22:37 Reqaw 阅读(321) 评论(0) 推荐(0)
摘要:题目: 某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。 现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。 Input 本题目包含多 阅读全文
posted @ 2017-08-09 22:17 Reqaw 阅读(759) 评论(0) 推荐(0)
摘要:题目: 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input 输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M<= 阅读全文
posted @ 2017-08-09 22:10 Reqaw 阅读(366) 评论(0) 推荐(0)
摘要:题目描述 YK新买了2n+1本相同的书,准备放在家里的3层书架上(每一层放书的数量>=0且<=n)。不过YK摆放他的书有些特殊的要求,即任意两层摆放的书的数目之和,严格大于另一层的书的数目。现在YK想知道在满足他的要求的前提下有多少种不同的摆书方法。 输入 输入有多行,每行一个整数n(1<=n<1e 阅读全文
posted @ 2017-08-05 08:41 Reqaw 阅读(332) 评论(0) 推荐(0)
摘要:题目: There are N (2<=N<=600) cities,each has a value of happiness,we consider two cities A and B whose value of happiness are VA and VB,if VA is a prim 阅读全文
posted @ 2017-08-03 10:23 Reqaw 阅读(267) 评论(0) 推荐(0)
摘要:题目: 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。 Input测试输入包含若干测试用例。每个测试用例的第1 阅读全文
posted @ 2017-08-03 10:15 Reqaw 阅读(235) 评论(0) 推荐(0)
摘要:题目: 老 Jack 有一片农田,以往几年都是靠天吃饭的。但是今年老天格外的不开眼,大旱。所以老 Jack 决定用管道将他的所有相邻的农田全部都串联起来,这样他就可以从远处引水过来进行灌溉了。当老 Jack 买完所有铺设在每块农田内部的管道的时候,老 Jack 遇到了新的难题,因为每一块农田的地势高 阅读全文
posted @ 2017-08-03 10:04 Reqaw 阅读(277) 评论(0) 推荐(0)
摘要:题目: There exists a world within our world A world beneath what we call cyberspace. A world protected by firewalls, passwords and the most advanced sec 阅读全文
posted @ 2017-08-03 09:38 Reqaw 阅读(206) 评论(0) 推荐(0)
摘要:题目: In the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with each other via networks. If two QS want to 阅读全文
posted @ 2017-08-03 09:29 Reqaw 阅读(259) 评论(0) 推荐(0)
摘要:题目: The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some year 阅读全文
posted @ 2017-08-03 09:02 Reqaw 阅读(204) 评论(0) 推荐(0)
摘要:描述 随着小Hi拥有城市数目的增加,在之间所使用的Prim算法已经无法继续使用了——但是幸运的是,经过计算机的分析,小Hi已经筛选出了一些比较适合建造道路的路线,这个数量并没有特别的大。 所以问题变成了——小Hi现在手上拥有N座城市,且已知其中一些城市间建造道路的费用,小Hi希望知道,最少花费多少就 阅读全文
posted @ 2017-08-03 08:43 Reqaw 阅读(464) 评论(0) 推荐(0)
摘要:描述 最近,小Hi很喜欢玩的一款游戏模拟城市开放出了新Mod,在这个Mod中,玩家可以拥有不止一个城市了! 但是,问题也接踵而来——小Hi现在手上拥有N座城市,且已知这N座城市中任意两座城市之间建造道路所需要的费用,小Hi希望知道,最少花费多少就可以使得任意两座城市都可以通过所建造的道路互相到达(假 阅读全文
posted @ 2017-08-03 08:29 Reqaw 阅读(278) 评论(0) 推荐(0)
摘要:题目: Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会. 魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回 阅读全文
posted @ 2017-08-02 20:50 Reqaw 阅读(190) 评论(0) 推荐(0)
摘要:题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2412 题目: Benny has a spacious farm land to irrigate. The farm land is a rectangle, 阅读全文
posted @ 2017-08-01 22:58 Reqaw 阅读(170) 评论(0) 推荐(0)
摘要:题目: A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits 阅读全文
posted @ 2017-08-01 22:40 Reqaw 阅读(196) 评论(0) 推荐(0)
摘要:题目: There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, 阅读全文
posted @ 2017-08-01 22:31 Reqaw 阅读(213) 评论(0) 推荐(0)
摘要:题目: The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region 阅读全文
posted @ 2017-08-01 22:00 Reqaw 阅读(675) 评论(0) 推荐(0)
摘要:题目: A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adj 阅读全文
posted @ 2017-08-01 20:40 Reqaw 阅读(162) 评论(0) 推荐(0)
摘要:题目: The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie cou 阅读全文
posted @ 2017-08-01 13:17 Reqaw 阅读(1127) 评论(0) 推荐(1)
摘要:题目: A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> anothe 阅读全文
posted @ 2017-08-01 12:55 Reqaw 阅读(144) 评论(0) 推荐(0)
摘要:题目: Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about t 阅读全文
posted @ 2017-08-01 12:44 Reqaw 阅读(133) 评论(0) 推荐(0)