HDU
gtuif
大多数人永远都不会了解真实的你,但是他们会看到你所做的一切。。。
展开
-
HDU 2180 时钟
时钟Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2186 Accepted Submission(s): 626Problem Description从a点b分到s点t分时针和分针重合多少次?原创 2017-07-20 20:54:32 · 272 阅读 · 0 评论 -
nyoj 阶乘之和
阶乘之和时间限制:3000 ms | 内存限制:65535 KB难度:3描述给你一个非负数整数n,判断n是不是一些数(这些数不允许重复使用,且为正数)的阶乘之和,如9=1!+2!+3!,如果是,则输出Yes,否则输出No;输入第一行有一个整数0每组测试数据有一个正整数n输出如果符合条件,输出Yes,否则输出No;样例输入2910样例输出Y原创 2017-07-26 19:26:24 · 194 阅读 · 0 评论 -
E - Max Sum HDU - 1003
Given a sequence a11,a22,a33......ann, your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 14. InputThe原创 2017-07-26 19:34:45 · 236 阅读 · 0 评论 -
A - 还是畅通工程
某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input 测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 当N为0时,输入结束,该用例不被处理。Output原创 2017-08-03 23:09:49 · 204 阅读 · 0 评论 -
D - 畅通工程
省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。Input 测试输入包含若干测试用例。每个测试用例的第1行给出评估的道路条数 N、村庄数目M ( 行对应村庄间道路的成本,每行给出一对正整原创 2017-08-03 23:31:00 · 398 阅读 · 0 评论 -
F - 畅通工程再续
相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求实现任意2个小原创 2017-08-03 23:45:42 · 206 阅读 · 0 评论 -
H - Constructing Roads
There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only if t原创 2017-08-03 23:58:15 · 243 阅读 · 0 评论 -
F - Just a Hook HDU - 1698
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 of several consecutive metallic sticks which are of the same length.原创 2017-09-08 13:41:28 · 268 阅读 · 0 评论 -
HDU 2709 Sumsets
SumsetsTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3226 Accepted Submission(s): 1288Problem DescriptionFarmer John commanded原创 2017-09-28 20:58:59 · 223 阅读 · 0 评论 -
HDU 1754 I Hate It
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 97400 Accepted Submission(s): 36773 Problem Description很多学校流行一种比较的习惯。老师们很喜欢询...原创 2018-07-25 21:59:39 · 513 阅读 · 0 评论 -
HDU 1051 Wooden Sticks
Wooden SticksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25019 Accepted Submission(s): 10086 Problem DescriptionThere is a pile o...原创 2018-07-21 09:00:31 · 117 阅读 · 0 评论 -
2018 Multi-University Training Contest 5 1005 Everything Has Changed
Everything Has ChangedTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 793 Accepted Submission(s): 466Special Judge Problem Descriptio...原创 2018-08-07 22:23:53 · 158 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第四场)Another Distinct Values
链接:https://www.nowcoder.com/acm/contest/142/D来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144KSpecial Judge, 64bit IO Format: %lld题目描述Chiaki has an n x n matrix. She would like to fi...原创 2018-08-15 11:18:05 · 165 阅读 · 0 评论 -
2018 Multi-University Training Contest 6 Pinball
PinballTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0 Problem DescriptionThere is a slope on the 2D pl...原创 2018-08-08 17:04:56 · 164 阅读 · 0 评论 -
F - Rails
There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possible to e原创 2017-07-25 23:59:52 · 164 阅读 · 0 评论 -
D - 看病要排队
看病要排队这个是地球人都知道的常识。 不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少)同时看病。而看病的人病情有轻重,所以不能根据简单的先来先服务的原则。所以医院对每种病情规定了10种不同的优先级。级别为10的优先权最高,级别为1的优先权最低。医生在看病时,则会在他的队伍里面选择一个优先权最高的人进行诊治。如果遇到两个优先权一样的病原创 2017-07-25 23:51:58 · 426 阅读 · 0 评论 -
C - Windows Message Queue
Message queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If something happens to this process, such as mouse click, text change, the system wil原创 2017-07-25 23:44:33 · 368 阅读 · 0 评论 -
HPU DFS + BFS 专项练习A - Red and Black HDU - 1312
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, he can move to one of four adjacent tiles. But he can'原创 2017-07-31 23:16:52 · 284 阅读 · 0 评论 -
HDU 1010 Tempter of the Bone
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 could feel the ground sinking. He realized that the bone原创 2017-08-01 18:18:47 · 163 阅读 · 0 评论 -
C - 剪花布条
一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。 Out原创 2017-08-16 11:00:42 · 637 阅读 · 1 评论 -
D - Count the string
It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For example: s: "aba原创 2017-08-16 11:08:23 · 307 阅读 · 0 评论 -
E - Cyclic Nacklace
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 yuan left. he is too distressed and thinking about how to原创 2017-08-16 11:18:00 · 186 阅读 · 0 评论 -
F - Number Sequence
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 find a number K which make a[K] = b[1], a[K + 1] = b[2],原创 2017-08-16 11:21:07 · 184 阅读 · 0 评论 -
G - 怪盗基德的挑战书
“在树最美丽的那天,当时间老人再次把大钟平均分开时,我会降临在灯火之城的金字塔前,带走那最珍贵的笑容。”这是怪盗基德盗取巴黎卢浮宫的《蒙娜丽莎的微笑》这幅画时,挑战书上的内容。 但这次,怪盗基德的挑战书上出现了一串串小写字母“aaab sdfeeddd...”。柯南以小学生的眼睛,超凡高中生的头脑,快速统计各种字母频率,字符串长度,并结合挑战书出现的时间等信息,试图分析怪盗基德的意图。最后原创 2017-08-16 11:23:52 · 257 阅读 · 0 评论 -
C - Oil Deposits HDU1241
The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides th原创 2017-08-02 14:02:17 · 220 阅读 · 0 评论 -
A - 最少拦截系统
某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹. 怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截系原创 2017-08-09 18:20:00 · 221 阅读 · 0 评论 -
B - Bridging signals
'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, making the signals on the chip connecting the ports原创 2017-08-09 18:23:51 · 248 阅读 · 0 评论 -
C - Bellovin
Peter has a sequence a1,a2,...,ana1,a2,...,an and he define a function on the sequence -- F(a1,a2,...,an)=(f1,f2,...,fn)F(a1,a2,...,an)=(f1,f2,...,fn), where fifi is the length of the longest in原创 2017-08-10 08:42:53 · 287 阅读 · 0 评论 -
A - ACboy needs your help again!
ACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(. As a smart ACMer, you want to get ACboy out of the原创 2017-07-25 23:14:42 · 178 阅读 · 0 评论 -
B - Train Problem I
As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over t原创 2017-07-25 23:28:12 · 213 阅读 · 0 评论 -
HDU 1166 敌兵布阵
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 121928 Accepted Submission(s): 51000 Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国...原创 2018-08-08 22:03:05 · 139 阅读 · 0 评论