08 2015 档案

HDU 2955 Robberies
摘要:RobberiesProblem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end,... 阅读全文

posted @ 2015-08-29 11:13

NTOJ 290 动物统计(加强版)
摘要:动物统计加强版描述在美丽大兴安岭原始森林中存在数量繁多的物种,在勘察员带来的各种动物资料中有未统计数量的原始动物的名单。科学家想判断这片森林中哪种动物的数量最多,但是由于数据太过庞大,科学家终于忍受不了,想请聪明如你的ACMer来帮忙。输入第一行输入动物名字的数量N(1 2 #include 3 #... 阅读全文

posted @ 2015-08-28 22:32

POJ 3624 Charm Bracelet
摘要:Charm BraceletDescriptionBessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms... 阅读全文

posted @ 2015-08-27 19:17

HDU 2602 Bone Collector
摘要:Bone CollectorProblem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies... 阅读全文

posted @ 2015-08-27 16:59

POJ 1523 SPF(无向图割顶)
摘要:SPFDescriptionConsider the two networks shown below. Assuming that data moves around these networks only between directly connected nodes on a peer-to... 阅读全文

posted @ 2015-08-21 20:47

HDU 5311 Hidden String
摘要:Hidden StringProblem DescriptionToday is the 1st anniversary of BestCoder. Soda, the contest manager, gets a string s of length n. He wants to find th... 阅读全文

posted @ 2015-08-21 20:41

HDU 1421 搬寝室
摘要:搬寝室Problem Description搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2*k件过去就行了.但还是会很... 阅读全文

posted @ 2015-08-20 11:30

HDU 1058 Humble Numbers
摘要:Humble NumbersProblem DescriptionA 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, 1... 阅读全文

posted @ 2015-08-20 11:28

POJ 3259 Wormholes(spfa判负环)
摘要:WormholesDescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it i... 阅读全文

posted @ 2015-08-19 11:01

POJ 3468 A Simple Problem with Integers
摘要:A Simple Problem with IntegersDescriptionYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation i... 阅读全文

posted @ 2015-08-17 17:40

HDU 5253 连接的管道(prim+优先队列)
摘要:连接的管道Problem Description老 Jack 有一片农田,以往几年都是靠天吃饭的。但是今年老天格外的不开眼,大旱。所以老 Jack 决定用管道将他的所有相邻的农田全部都串联起来,这样他就可以从远处引水过来进行灌溉了。当老 Jack 买完所有铺设在每块农田内部的管道的时候,老 Jack... 阅读全文

posted @ 2015-08-17 09:49

HDU 3687 Labeling Balls(逆向拓扑)
摘要:Labeling BallsDescriptionWindy has N balls of distinct weights from 1 unit to N units. Now he tries to label them with 1 to N in such a way that:No tw... 阅读全文

posted @ 2015-08-14 17:41

HDU 2647 Reward(toposort)
摘要:RewardProblem DescriptionDandelion's uncle is a boss of a factory. As the spring festival is coming , he wants to distribute rewards to his workers. ... 阅读全文

posted @ 2015-08-14 12:23

HDU 2094 产生冠军
摘要:产生冠军Problem Description有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。如果A打败了B,B又打败了C,而且,C又打败了A,... 阅读全文

posted @ 2015-08-13 19:40

HDU 1285 确定比赛名次(toposort)
摘要:确定比赛名次Problem Description有N个比赛队(1 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 int G[505][505]; 9 int indegree[505];10 int ... 阅读全文

posted @ 2015-08-13 15:51

HDU 2680 Choose the best route(dijkstra+优先队列优化)
摘要:Choose the best routeProblem DescriptionOne day , Kiki wants to visit one of her friends. As she is liable to carsickness , she wants to arrive at her... 阅读全文

posted @ 2015-08-12 21:23

POJ 1789 Truck History
摘要:Truck HistoryDescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture... 阅读全文

posted @ 2015-08-12 20:05

HDU 1546 Idiomatic Phrases Game(dijkstra+优先队列)
摘要:Idiomatic Phrases GameProblem DescriptionTom is playing a game called Idiomatic Phrases Game. An idiom consists of several Chinese characters and has ... 阅读全文

posted @ 2015-08-12 17:30

HDU 2122 HDU Today(dijkstra+map)
摘要:HDU TodayProblem Description经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。这样住... 阅读全文

posted @ 2015-08-11 21:16

HDU 1874 畅通工程续(dijkstra+优先队列)
摘要:畅通工程续Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行... 阅读全文

posted @ 2015-08-11 18:45

HDU 1548 最短路
摘要:最短路Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个... 阅读全文

posted @ 2015-08-11 16:18

HDU 1532 Drainage Ditches
摘要:Drainage DitchesProblem DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the ... 阅读全文

posted @ 2015-08-11 14:58

HDU 1598 find the most comfortable road
摘要:find the most comfortable roadProblem DescriptionXX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed... 阅读全文

posted @ 2015-08-10 16:54

HDU 1102 Constructing Roads
摘要:Constructing RoadsProblem DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two village... 阅读全文

posted @ 2015-08-10 10:48

HDU 2122 Ice_cream’s world III(最小生成树)
摘要:Ice_cream’s world IIIProblem Descriptionice_cream’s world becomes stronger and stronger; every road is built as undirected. The queen enjoys traveling... 阅读全文

posted @ 2015-08-10 10:13

HDU 1394 Minimum Inversion Number
摘要:Minimum Inversion NumberProblem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisf... 阅读全文

posted @ 2015-08-09 16:44

HDU 5363 Key Set(快速幂取模)
摘要:Key SetProblem Descriptionsoda has a set S with n integers {1,2,…,n}. A set is called key set if the sum of integers in the set is an even number. He ... 阅读全文

posted @ 2015-08-07 17:24

HDU 5339 Untitled(暴搜)
摘要:UntitledProblem DescriptionThere is an integer a and n integers b1,…,bn. After selecting some numbers from b1,…,bn in any order, say ... 阅读全文

posted @ 2015-08-07 16:07

POJ 2406 Power Strings
摘要:Power Strings Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcde 阅读全文

posted @ 2015-08-07 16:00

HDU 1698 Just a Hook(线段树lazy成段更新)
摘要:Just a Hook Problem Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up 阅读全文

posted @ 2015-08-06 20:04

ZOJ 1671 Walking ant(bfs)
摘要:Walking AntTime Limit: 2 Seconds Memory Limit: 65536 KBAnts are quite diligent. They sometimes build their nests beneath flagstones.Here, an ant is w... 阅读全文

posted @ 2015-08-06 16:15

HDU 1728 逃离迷宫(bfs)
摘要:逃离迷宫Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中... 阅读全文

posted @ 2015-08-06 16:10

POJ 2251 Dungeon Master(bfs)
摘要:Dungeon MasterDescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may... 阅读全文

posted @ 2015-08-05 21:23

POJ 3275 Catch That Cow(bfs)
摘要:Catch That CowDescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0... 阅读全文

posted @ 2015-08-05 21:19

POJ 3984 迷宫问题(bfs+路径记录)
摘要:迷宫问题Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着... 阅读全文

posted @ 2015-08-05 21:17

POJ 3620 Avoid The Lakes
摘要:Avoid The LakesDescriptionFarmer John's farm was flooded in the most recent storm, a fact only aggravated by the information that his cows are deathly... 阅读全文

posted @ 2015-08-04 23:57

ZOJ 2100 Seeding
摘要:SeedingProblem Description It is spring time and farmers have to plant seeds in the field. Tom has a nice field, which is a rectangle with n * m squar... 阅读全文

posted @ 2015-08-04 23:54

POJ 2245 Lotto
摘要:LottoDescriptionIn the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular strategy to play Lotto - although it doesn... 阅读全文

posted @ 2015-08-04 23:51

HDU 1181 变形课
摘要:变形课Problem Description呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那么它的作用就恰好... 阅读全文

posted @ 2015-08-04 23:48

HDU 4707 Pet(邻接表dfs)
摘要:PetProblem DescriptionOne day, Lin Ji wake up in the morning and found that his pethamster escaped. He searched in the room but didn... 阅读全文

posted @ 2015-08-04 23:46

ZOJ 2734 Exchange Cards
摘要:Exchange CardsProblem DescriptionAs a basketball fan, Mike is also fond of collecting basketball player cards. But as a student, he can ... 阅读全文

posted @ 2015-08-04 23:40

HDU 1045 Fire Net
摘要:Fire NetProblem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and... 阅读全文

posted @ 2015-08-04 23:36

HDU 1754 I Hate It (线段树单点更新求最大值RMQ)
摘要:I Hate ItProblem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位... 阅读全文

posted @ 2015-08-04 11:35

HDU 1166 敌兵布阵(线段树单点更新区间求和)
摘要:敌兵布阵Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手... 阅读全文

posted @ 2015-08-03 21:40

HDU 1686 Oulipo(KMP)
摘要:OulipoProblem DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He wa... 阅读全文

posted @ 2015-08-03 21:31

HDU 1241 Oil Deposits(八方向联通块)
摘要:Oil DepositsProblem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvC... 阅读全文

posted @ 2015-08-03 16:22

HDU 2553 N皇后问题
摘要:N皇后问题Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整... 阅读全文

posted @ 2015-08-03 16:19

HDU 1251 统计难题(Trie tree)
摘要:统计难题Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单... 阅读全文

posted @ 2015-08-02 22:23

NYOJ 325 zb的生日
摘要:zb的生日描述今天是阴历七月初五,acm队员zb的生日。zb正在和C小加、never在武汉集训。他想给这两位兄弟买点什么庆祝生日,经过 调查,zb发现C小加和never都很喜欢吃西瓜,而且一吃就是一堆的那种,zb立刻下定决心买了一堆西瓜。当他准备把西瓜送... 阅读全文

posted @ 2015-08-02 20:10

HDU 3635 Dragon Balls(并查集)
摘要:Dragon BallsProblem DescriptionFive hundred years later, the number of dragon balls will increase unexpectedly, so it's too difficult for... 阅读全文

posted @ 2015-08-01 16:48

HDU 4883 TIANKENG’s restaurant
摘要:TIANKENG’s restaurantProblem DescriptionTIANKENG manages a restaurant after graduating from ZCMU, and tens of thousands of customers come ... 阅读全文

posted @ 2015-08-01 16:45

导航