![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hdu
文章平均质量分 56
张宜强
道阻且长,行则将至
展开
-
hdu1171:Big Event in HDU(多重背包)
http://acm.hdu.edu.cn/showproblem.php?pid=1171Problem DescriptionNowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College ha...原创 2019-06-09 16:19:56 · 268 阅读 · 0 评论 -
hdu2444:The Accomodation of Students(二分图判断+最大匹配)
http://acm.hdu.edu.cn/showproblem.php?pid=2444Problem DescriptionThere are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C ...原创 2019-07-03 14:13:07 · 165 阅读 · 0 评论 -
hdu2236:无题II(枚举+匈牙利算法)
http://acm.hdu.edu.cn/showproblem.php?pid=2236Problem Description这是一个简单的游戏,在一个n*n的矩阵中,找n个数使得这n个数都在不同的行和列里并且要求这n个数中的最大值和最小值的差值最小。Input输入一个整数T表示T组数据。对于每组数据第一行输入一个正整数n(1<=n<=100)表示矩阵...原创 2019-07-03 15:27:35 · 221 阅读 · 0 评论 -
hdu2813:One fihgt one(KM匹配)
http://acm.hdu.edu.cn/showproblem.php?pid=2813Problem DescriptionLv Bu and his soldiers are facing a cruel war——Cao Cao had his best generals just miles away.There’s little time , but Lv Bu is un...原创 2019-07-03 17:53:38 · 234 阅读 · 0 评论 -
hdu1533:Going Home(KM匹配)
http://acm.hdu.edu.cn/showproblem.php?pid=1533Problem DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally,...原创 2019-07-08 08:46:35 · 167 阅读 · 0 评论 -
hdu1285:确定比赛名次(拓扑排序)
http://acm.hdu.edu.cn/showproblem.php?pid=1285Problem Description有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P...原创 2019-07-08 08:47:36 · 223 阅读 · 0 评论 -
hdu2094:产生冠军(判断有环图)
http://acm.hdu.edu.cn/showproblem.php?pid=2094Problem Description有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。...原创 2019-07-08 08:47:10 · 168 阅读 · 0 评论 -
hdu2647:Reward(拓扑排序+贪心)
http://acm.hdu.edu.cn/showproblem.php?pid=2647Problem DescriptionDandelion's uncle is a boss of a factory. As the spring festival is coming , he wants to distribute rewards to his workers. Now he ...原创 2019-07-08 08:47:29 · 210 阅读 · 0 评论 -
hdu2112:HDU Today(最短路)
http://acm.hdu.edu.cn/showproblem.php?pid=2112Problem Description经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。这样住了一段时间,徐总...原创 2019-07-08 08:46:15 · 115 阅读 · 0 评论 -
hdu 2068:RPG的错排(错排)
http://acm.hdu.edu.cn/showproblem.php?pid=2068Problem Description今年暑假杭电ACM集训队第一次组成女生队,其中有一队叫RPG,但做为集训队成员之一的野骆驼竟然不知道RPG三个人具体是谁谁。RPG给他机会让他猜猜,第一次猜:R是公主,P是草儿,G是月野兔;第二次猜:R是草儿,P是月野兔,G是公主;第三次猜:R是草儿,P是公主,...原创 2019-07-24 11:20:52 · 146 阅读 · 0 评论 -
hdu2067:小兔的棋盘(动态规划)
http://acm.hdu.edu.cn/showproblem.php?pid=2067Problem Description小兔的叔叔从外面旅游回来给她带来了一个礼物,小兔高兴地跑回自己的房间,拆开一看是一个棋盘,小兔有所失望。不过没过几天发现了棋盘的好玩之处。从起点(0,0)走到终点(n,n)的最短路径数是C(2n,n),现在小兔又想如果不穿越对角线(但可接触对角线上的格点),这样...原创 2019-07-24 11:53:15 · 4965 阅读 · 0 评论 -
hdu2282:Chocolate(KM匹配)
http://acm.hdu.edu.cn/showproblem.php?pid=2282Problem DescriptionLethe loves eating chocolates very much. In Lethe's birthday, her good friend echo brings N boxes to her, and makes the boxes on th...原创 2019-07-02 22:26:56 · 218 阅读 · 0 评论 -
hdu1556:Color the ball(差分)
http://acm.hdu.edu.cn/showproblem.php?pid=1556Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每...原创 2019-07-02 12:01:41 · 518 阅读 · 0 评论 -
hdu1004: Let the Balloon Rise
http://acm.hdu.edu.cn/showproblem.php?pid=1004Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guess...原创 2019-06-09 15:32:54 · 166 阅读 · 0 评论 -
hdu1087 : Super Jumping! Jumping! Jumping!(动态规划)
http://acm.hdu.edu.cn/showproblem.php?pid=1087Problem DescriptionNowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know...原创 2019-06-09 19:53:12 · 210 阅读 · 0 评论 -
hdu1301:Jungle Roads(最小生成树)
http://acm.hdu.edu.cn/showproblem.php?pid=1301Problem DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads betwe...原创 2019-06-17 14:52:48 · 288 阅读 · 0 评论 -
hdu1162:Eddy's picture(最小生成树)
http://acm.hdu.edu.cn/showproblem.php?pid=1162Problem DescriptionEddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his smal...原创 2019-06-17 14:52:58 · 206 阅读 · 0 评论 -
hdu1176:免费馅饼(未解决)
http://acm.hdu.edu.cn/showproblem.php?pid=1176Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径...原创 2019-06-10 22:11:50 · 206 阅读 · 0 评论 -
hdu2159:FATE(二维费用背包)
http://acm.hdu.edu.cn/showproblem.php?pid=2159Problem Description最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验...原创 2019-06-10 23:19:48 · 197 阅读 · 0 评论 -
hdu2255:奔小康赚大钱(KM)
http://acm.hdu.edu.cn/showproblem.php?pid=2255Problem Description传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只...原创 2019-06-12 22:37:29 · 384 阅读 · 0 评论 -
hdu1151:Air Raid(最小路径覆盖)
http://acm.hdu.edu.cn/showproblem.php?pid=1151Problem DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that sta...原创 2019-06-17 14:53:04 · 195 阅读 · 0 评论 -
hdu1083:Courses(二分图最大匹配)
http://acm.hdu.edu.cn/showproblem.php?pid=1083Problem DescriptionConsider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whe...原创 2019-06-17 14:53:14 · 237 阅读 · 0 评论 -
hdu2544:最短路(Bellman-Ford)
http://acm.hdu.edu.cn/showproblem.php?pid=2544Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行...原创 2018-07-27 20:31:32 · 289 阅读 · 0 评论 -
hdu 3452:Bonsai(最小割)
http://acm.hdu.edu.cn/showproblem.php?pid=3452Problem DescriptionAfter being assaulted in the parking lot by Mr. Miyagi following the "All Valley Karate Tournament", John Kreese has come to you fo...原创 2019-07-17 14:49:56 · 186 阅读 · 0 评论 -
hdu 3549:Flow Problem(最大流)
http://acm.hdu.edu.cn/showproblem.php?pid=3549Problem DescriptionNetwork flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighte...原创 2019-07-17 14:37:59 · 150 阅读 · 0 评论 -
hdu 1867:A + B for you again(kmp)
http://acm.hdu.edu.cn/showproblem.php?pid=1867Problem DescriptionGenerally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two st...原创 2019-07-28 12:06:08 · 223 阅读 · 0 评论 -
hdu 5926:Mr. Frog’s Game
http://acm.hdu.edu.cn/showproblem.php?pid=5926Problem DescriptionOne day, Mr. Frog is playing Link Game (Lian Lian Kan in Chinese).In this game, if you can draw at most three horizontal or vertic...原创 2019-08-06 09:05:49 · 125 阅读 · 0 评论 -
hdu 2102:A计划(BFS)
http://acm.hdu.edu.cn/showproblem.php?pid=2102Problem Description可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定...原创 2019-08-06 11:22:16 · 144 阅读 · 0 评论 -
hdu 2680:Choose the best route(Dijkstra , SPFA)
http://acm.hdu.edu.cn/showproblem.php?pid=2680Problem DescriptionOne day , Kiki wants to visit one of her friends. As she is liable to carsickness , she wants to arrive at her friend’s home as soo...原创 2019-08-15 11:37:10 · 131 阅读 · 0 评论 -
hdu 5971 :Wrestling Match(DFS染色)
http://acm.hdu.edu.cn/showproblem.php?pid=5971Problem DescriptionNowadays, at least one wrestling match is held every year in our country. There are a lot of people in the game is "good player”, t...原创 2019-08-16 09:16:28 · 164 阅读 · 0 评论 -
hdu 1272 :小希的迷宫(并查集)
http://acm.hdu.edu.cn/showproblem.php?pid=1272Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从...原创 2019-08-16 10:28:30 · 397 阅读 · 0 评论 -
2017中国大学生程序设计竞赛-杭州站 Problem A. Super-palindrome(贪心)
题意分析:改变最少的字符,使字符串的每一个长度为奇数的子串都为回文串解题思路:如果想让任意奇数的子串为回文串,必须要让奇数位和偶数位上的所有字符相等,所以统计一下奇数位和偶数位上最多的字符,剩下的是要改变的。#include <stdio.h>#include <string.h>#include <algorithm>#defi...原创 2019-08-17 14:53:40 · 2287 阅读 · 0 评论 -
2017中国大学生程序设计竞赛-杭州站 Problem C. Hakase and Nano(博弈)
题意分析:有n堆石子,每次可以取一对石子的一颗或多颗,取得最后一颗石子的人获胜,Hakase每回合可以取两次,Nano每回合可以取一次,给出Hakase先手或后手,求Hakase会不会获胜。解题思路:因为Hakase每回合可以取两次,大部分情况下可以获胜,所以应该考虑Hakase失败的情况,当先手时,如果堆数是3的倍数,且全为1,那么他必败,因为每次H必须取两堆,对方取一堆,最...原创 2019-08-17 14:59:03 · 344 阅读 · 0 评论 -
hdu 4557 :非诚勿扰(vector + 二分)
题目链接Problem Description 作为2013年699万应届毕业生中的一员,由于宏观经济的不景气,小明在毕业当天就华丽丽地失业了! 经历了千难万苦的求职过程,小明特别能理解毕业生的就业之难,所以,他现在准备创建一家专门针对IT人才的求职中介公司——非诚勿扰人力资源开发有限公司。 基于工作的需要,小明根据求职学生的简历描述为每人评定了一个综合能力值,能力值是一个...原创 2019-09-26 21:06:40 · 1030 阅读 · 0 评论 -
hdu 6734:Decimal
http://acm.hdu.edu.cn/showproblem.php?pid=6734Problem DescriptionGiven a positive integer n, determine if 1n is an infinite decimal in decimal base. If the answer is yes, print “Yes” in a single l...原创 2019-09-29 14:56:19 · 728 阅读 · 5 评论 -
hdu 4292: Food(Dinic + 链式前向星)
http://acm.hdu.edu.cn/showproblem.php?pid=4292Problem Description You, a part-time dining service worker in your college’s dining hall, are now confused with a new problem: serve as many people a...原创 2019-07-31 18:35:18 · 244 阅读 · 0 评论 -
hdu 2717:Catch That Cow(BFS)
http://acm.hdu.edu.cn/showproblem.php?pid=2717Problem DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤...原创 2019-07-25 17:47:24 · 180 阅读 · 0 评论 -
hdu1870:愚人节的礼物(栈)
http://acm.hdu.edu.cn/showproblem.php?pid=1870Problem Description四月一日快到了,Vayko想了个愚人的好办法——送礼物。嘿嘿,不要想的太好,这礼物可没那么简单,Vayko为了愚人,准备了一堆盒子,其中有一个盒子里面装了礼物。盒子里面可以再放零个或者多个盒子。假设放礼物的盒子里不再放其他盒子。用()表示一个盒子,B表示礼物,...原创 2019-07-19 18:25:53 · 170 阅读 · 0 评论 -
hdu3829:Cat VS Dog (最大独立集)
https://vjudge.net/problem/HDU-3829The zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child's like-animal is a cat...原创 2019-07-24 16:07:28 · 224 阅读 · 0 评论 -
hdu2458:Kindergarten (最大独立集)
https://vjudge.net/problem/HDU-2458In a kindergarten, there are a lot of kids. All girls of the kids know each other and all boys also know each other. In addition to that, some girls and boys know ...原创 2019-07-24 17:46:31 · 215 阅读 · 0 评论