hdu
文章平均质量分 84
纯纯的心儿
每天都在赚事业。。
展开
-
hdu 2680 最短路
最短路Time Limit : 5000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 42 Accepted Submission(s) : 28Font: Times New Roman | Verdana | GeorgiaFont S原创 2015-12-13 21:07:23 · 403 阅读 · 0 评论 -
hdu 2852 KiKi's K-Number
For the k-th number, we all should be very familiar with it. Of course,to kiki it is also simple. Now Kiki meets a very similar problem, kiki wants to design a container, the container is to support t原创 2015-06-04 15:43:31 · 367 阅读 · 0 评论 -
Sort it hdu 2689
Problem DescriptionYou want to processe a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending order. Then how many times it need.原创 2015-06-03 13:05:29 · 387 阅读 · 0 评论 -
hdu 1541 Stars
Problem DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars t原创 2015-06-02 23:50:04 · 337 阅读 · 0 评论 -
hdu 3999 The order of a Tree
The order of a TreeProblem DescriptionAs we know,the shape of a binary search tree is greatly related to the order of keys we insert. To be precisely:1. insert a key k to a empty tree, then原创 2015-05-16 08:36:04 · 335 阅读 · 0 评论 -
二叉搜索树 hdu 3791
二叉搜索树Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 17 Accepted Submission(s) : 11Font: Times New Roman | Verdana | GeorgiaFont原创 2015-05-15 22:46:22 · 475 阅读 · 0 评论 -
hdu 2955 Robberies
Problem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided t原创 2015-05-05 14:25:15 · 366 阅读 · 0 评论 -
hdu 2546 饭卡
Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。Inp原创 2015-05-03 23:55:10 · 330 阅读 · 0 评论 -
hdu 2209 翻纸牌游戏
Problem Description有一种纸牌游戏,很有意思,给你N张纸牌,一字排开,纸牌有正反两面,开始的纸牌可能是一种乱的状态(有些朝正,有些朝反),现在你需要整理这些纸牌。但是麻烦的是,每当你翻一张纸牌(由正翻到反,或者有反翻到正)时,他左右两张纸牌(最左边和最右边的纸牌,只会影响附近一张)也必须跟着翻动,现在给你一个乱的状态,问你能否把他们整理好,使得每张纸牌都正面朝上,如果可以原创 2015-05-03 16:50:34 · 426 阅读 · 0 评论 -
decimal system hdu 2106
decimal systemTime Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 3 Accepted Submission(s) : 2Font: Times New Roman | Verdana | Georgia原创 2015-05-02 20:22:24 · 473 阅读 · 0 评论 -
hdu 2124 Repair the Wall
Problem DescriptionLong time ago , Kitty lived in a small village. The air was fresh and the scenery was very beautiful. The only thing that troubled her is the typhoon.When the typhoon came,原创 2015-05-03 00:03:06 · 366 阅读 · 0 评论 -
hdu 2037 今年暑假不AC
Problem Description“今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%...”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、原创 2015-05-02 23:42:57 · 271 阅读 · 0 评论 -
hdu 1710 Binary Tree Traversals
Binary Tree TraversalsProblem DescriptionA binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binary trees called the left and right subtrees原创 2015-05-16 12:13:05 · 310 阅读 · 0 评论 -
hdu 1892 See you~
See you~Problem DescriptionNow I am leaving hust acm. In the past two and half years, I learned so many knowledge about Algorithm and Programming, and I met so many good friends. I want to say原创 2015-06-04 14:42:58 · 410 阅读 · 0 评论 -
hdu 3074 Multiply game
Problem DescriptionTired of playing computer games, alpc23 is planning to play a game on numbers. Because plus and subtraction is too easy for this gay, he wants to do some multiplication in a num原创 2015-06-09 11:32:12 · 380 阅读 · 0 评论 -
HDU 1874 畅通工程续
畅通工程续Time Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 44 Accepted Submission(s) : 27Font: Times New Roman | Verdana | GeorgiaFont原创 2015-12-13 20:57:49 · 402 阅读 · 0 评论 -
hdu 1253 胜利大逃亡
胜利大逃亡Time Limit : 4000/2000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 50 Accepted Submission(s) : 20Font: Times New Roman | Verdana | GeorgiaFont原创 2015-04-16 16:14:00 · 1928 阅读 · 0 评论 -
hdu 1078 FatMouse and Cheese
Problem DescriptionFatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At e原创 2015-06-14 16:18:36 · 425 阅读 · 0 评论 -
hdu 2602 Bone Collector
Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grav原创 2015-05-03 17:28:48 · 314 阅读 · 0 评论 -
hdu 2818 Building Block
Problem DescriptionJohn are playing with blocks. There are N blocks (1 M X Y : Put the whole pile containing block X up to the pile containing Y. If X and Y are in the same pile, just ignore t原创 2015-04-06 00:45:01 · 446 阅读 · 0 评论 -
hdu 1671 Phone List
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 phone catalogue listed these numbers:1. Emerge原创 2015-06-14 14:38:39 · 315 阅读 · 0 评论 -
hdu 1272 小希的迷宫
小希的迷宫Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 69 Accepted Submission(s) : 24Font: Times New Roman | Verdana | GeorgiaFont原创 2015-04-04 17:36:24 · 323 阅读 · 0 评论 -
hdu 2952 Counting Sheep
Problem DescriptionA while ago I had trouble sleeping. I used to lie awake, staring at the ceiling, for hours and hours. Then one day my grandmother suggested I tried counting sheep after I'd gone原创 2015-06-14 16:02:04 · 474 阅读 · 0 评论 -
hdu 1251 统计难题
Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一原创 2015-06-10 23:52:37 · 428 阅读 · 0 评论 -
hdu 1394 Minimum Inversion Number(树状数组)
Minimum Inversion NumberTime Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 26 Accepted Submission(s) : 20Font: Times New Roman | Verdan原创 2015-06-04 17:06:12 · 411 阅读 · 0 评论 -
hdu 1166 敌兵布阵
C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所原创 2015-06-04 00:15:02 · 473 阅读 · 0 评论 -
hdu 1050 Moving Tables
Problem DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north sid原创 2015-05-02 21:13:56 · 405 阅读 · 0 评论 -
hdu 1789 Doing Homework again
Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands i原创 2015-05-02 22:38:54 · 216 阅读 · 0 评论 -
hdu 2216 Game III
Problem DescriptionZjt and Sara will take part in a game, named Game III. Zjt and Sara will be in a maze, and Zjt must find Sara. There are some strang rules in this maze. If Zjt move a step, Sara原创 2015-04-05 23:07:48 · 449 阅读 · 0 评论 -
ZOJ 1041 Transmitters
In a wireless network with multiple transmitters sending on the same frequencies, it is often a requirement that signals don't overlap, or at least that they don't conflict. One way of accomplishing原创 2015-04-05 00:18:15 · 276 阅读 · 0 评论 -
hdu5186 zhx's submissions
Izhx's submissionsTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64DescriptionAs one of the most powerful brushes, zhx submits a lot of code on many oj and mo原创 2015-04-05 12:01:27 · 417 阅读 · 0 评论 -
hdu 1232 畅通工程
畅通工程Time Limit : 4000/2000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 62 Accepted Submission(s) : 39Font: Times New Roman | Verdana | GeorgiaFont原创 2015-04-04 12:38:33 · 236 阅读 · 0 评论 -
hdu 2012 A计划
该题是典型的bfs 和队列的结合~~~#include#include#includeusing namespace std;struct node{ int x,y,k; int time; friend bool operator<(node a,node b) //优先队列 a小的优先级高 { return a.time>b.time; }};原创 2015-04-02 00:32:16 · 418 阅读 · 0 评论 -
hdu 1392 Surround the Trees
本题是一个关于几何的题目,题目的意思很简单,就是求最外围的长度,主要是 凸包的模版的运用,借鉴大神们的思路和模版,还有叉积的知识,然后a~~#include #include #include #define Max 501#define eps 1e-8using namespace std;struct point{ double x; double y; double原创 2015-04-01 10:06:31 · 439 阅读 · 0 评论 -
hdu 1241 Oil Deposits
该题就是一个模拟题,标记,上下左右和对角线,即可 累加】#includechar a[105][105];int m,n;void sou(int i,int j){ if(a[i][j]=='*') return; else if(a[i][j]=='@') { a[i][j]='*'; if(i-1>=原创 2015-03-24 23:50:36 · 279 阅读 · 0 评论 -
ddu 1010 Tempter of the Bone
该题是一个典型的搜索题, #include#include#includeint a,b,c,d,n,m,T;char map[10][10]; //地图数组 int biao[10][10];// 标记访问数组 int dx[]={0,0,1,-1};//控制左右上下的移动坐标变化; int dy[]={-1,1,0,0};int sou(int x,int y,int t原创 2015-03-31 17:55:25 · 343 阅读 · 0 评论 -
hdu 1896 Stones
题意:sempr走在路上会遇见一些石头,如果遇见第奇数个石子,则将它扔到前面,如果是偶数,则什么也不做,如果某一个位置上有多个石头,则先遇见扔的比较近的那个,现在给出一些石头的初始位置和能够扔的距离,问到最后最远处的石头离初始位置多远!思路:用优先队列,自定义优先级,当位置小的优先级最大,位置相同时juli小的优先级较大。#include#include#includeu原创 2015-04-02 14:11:23 · 304 阅读 · 0 评论 -
hdu 1072 Nightmare
该题是一个bfs题 运用了 优先队列的方法,实现最小步数。 注意一点是 计时器恢复只能用一次。#include#include#include #include #includeusing namespace std; int dd[4][2]={0,1,1,0,0,-1,-1,0};int map[10][10];int bbs,n,m,i,j,shix,sh原创 2015-04-02 23:49:04 · 326 阅读 · 0 评论 -
hdu 1269 迷宫城堡
hdu 1269 迷宫城堡Problem Description为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(NInput输入包含多组数据,输入的第一行有两个数:N和M,接下来的M行每行有两个数a和b,表示了一条通道可以从A房间来到B房间。文件最后以两个0结束。Output对于输入的每组数据,如果任意两个房间都是相互连接的,输出"Yes",否则原创 2015-03-23 21:46:02 · 668 阅读 · 0 评论 -
Four Inages Strategy hdu 5206
Four Inages StrategyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 182 Accepted Submission(s): 66Problem DescriptionYoung F原创 2015-04-18 21:51:27 · 331 阅读 · 0 评论