训练
文章平均质量分 83
俱往矣_wpt
这个作者很懒,什么都没留下…
展开
-
nyoj305
题目描述Dr.Kong设计的机器人卡多掌握了加减法运算以后,最近又学会了一些简单的函数求值,比如,它知道函数min(20,23)的值是20 ,add(10,98) 的值是108等等。经过训练,Dr.Kong设计的机器人卡多甚至会计算一种嵌套的更复杂的表达式。假设表达式可以简单定义为:1. 一个正的十进制数 x 是一个表达式。2. 如果 x 和 y 是 表达式,则 函数min(x原创 2017-04-19 17:39:54 · 370 阅读 · 0 评论 -
hdu 1867 A + B for you again
Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as “asdf” and “sdfg”, the result of the addition between原创 2017-08-10 15:39:55 · 279 阅读 · 0 评论 -
poj 1961 Period
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 the prefix is a periodic string. That is, for each i (2原创 2017-08-10 15:33:30 · 290 阅读 · 0 评论 -
Til the Cows Come Home POJ - 2387
Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get b原创 2017-08-19 09:23:53 · 246 阅读 · 0 评论 -
hdu 1203 I NEED A OFFER!
Speakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得到这个学校offer的可能性b。不同学校之原创 2017-07-27 16:38:31 · 290 阅读 · 0 评论 -
poj 1797 Heavy Transportation Dijkstra&&Kruskal
Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cust...原创 2017-08-06 16:12:01 · 911 阅读 · 0 评论 -
Kruskal 算法模板题
描述随着小Hi拥有城市数目的增加,在之间所使用的Prim算法已经无法继续使用了——但是幸运的是,经过计算机的分析,小Hi已经筛选出了一些比较适合建造道路的路线,这个数量并没有特别的大。所以问题变成了——小Hi现在手上拥有N座城市,且已知其中一些城市间建造道路的费用,小Hi希望知道,最少花费多少就可以使得任意两座城市都可以通过所建造的道路互相到达(假设有A、B、C三座城市,只需要在AB之间和原创 2017-08-03 09:57:16 · 532 阅读 · 0 评论 -
Catch That Cow POJ - 3278
Farmer 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 ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,0原创 2017-08-19 09:03:34 · 232 阅读 · 0 评论 -
A hard Aoshu Problem HDU - 3699
Math Olympiad is called “Aoshu” in China. Aoshu is very popular in elementary schools. Nowadays, Aoshu is getting more and more difficult. Here is a classic Aoshu problem: ABBDE __ ABCCC = BDBDE原创 2017-10-08 13:09:07 · 1131 阅读 · 0 评论 -
poj 1321 棋盘问题
Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n原创 2017-10-08 13:32:24 · 538 阅读 · 0 评论 -
hdu2602 Bone Collector
Many 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 grave … The bone collecto原创 2017-07-27 16:13:46 · 384 阅读 · 0 评论 -
hdu 1003 Max Sum
Given a sequence a[1],a[2],a[3]......a[n], 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.Inp原创 2017-08-01 19:51:50 · 216 阅读 · 0 评论 -
HDU 1087 Super Jumping! Jumping! Jumping!
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 this game, so I introduce it to you now.原创 2017-08-01 20:01:21 · 198 阅读 · 0 评论 -
hdu 4763 Theme Section
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 songs. To make the programs more interesting and challe原创 2017-08-10 15:56:48 · 347 阅读 · 0 评论 -
hdu 2594
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 example. I want to find out if I have a talent in politi原创 2017-08-10 15:04:12 · 377 阅读 · 0 评论 -
Large Division LightOJ - 1214 大数取余
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 only if there exists an integer c such that a = b * c.原创 2017-08-17 16:12:55 · 261 阅读 · 0 评论 -
hautoj 1263: rqy的键盘
1263: rqy的键盘时间限制: 1秒 内存限制: 128 MB提交: 226 解决: 132提交 状态 题目描述rqy在和妹子约会,突然女票打来电话。rqy骗女票他在写代码。女票为了证实,问他键盘上F键左边是哪个键。你能否帮助rqy回应女票的质问?不然他可就要写思想汇报了...输入输入数据第一行是一个整数 T(1≤T≤10000),表示测试数据的组数。原创 2017-05-04 21:31:35 · 328 阅读 · 0 评论 -
hautoj 1268: 小天使改名
1268:小天使改名时间限制: 2秒 内存限制: 128 MB提交: 491 解决: 134提交 状态 题目描述小天使的b站帐号被大家发现啦。于是小天使决定改名,将他原有ID中的两个不同位置的字母进行交换。(小天使有可能将两个不同位置的相同字母进行交换,虽然这样做他的ID并没有发生变化)Lsf知道小天使原来的ID,他想知道某个ID是否可能是小天使的新ID。输原创 2017-05-04 21:38:45 · 1725 阅读 · 0 评论 -
HDU 2107
题目来源:http://acm.hdu.edu.cn/diy/contest_showproblem.php?cid=31654&pid=1002&hide=1&problem=Problem%20B解法或类型:Description 在实际的开发工作中,对字符串的处理是最常见的编程任务。本题目即是要求程序对用户输入的串进行处理。具体规则如下:1. 把每个单词的首字母变为大写。原创 2017-05-09 17:14:45 · 426 阅读 · 0 评论 -
取字符
题目来源:http://acm.hdu.edu.cn/diy/contest_showproblem.php?pid=1003&cid=31654&problem=Problem%20%20C解法或类型。Description 从标准输入读入一个由字符构成的串(不大于30个字符)。从该串中取出3个不重复的字符,求所有的取法。取出的字符,要求按字符升序排列成一个串。原创 2017-05-09 17:16:37 · 334 阅读 · 0 评论 -
上三角
解法或类型: Description 方阵的主对角线之上称为“上三角”。请你设计一个用于填充n阶方阵的上三角区域的程序。填充的规则是:使用1,2,3….的自然数列,从左上角开始,按照顺时针方向螺旋填充。 Input 程序运行时,从标准输入获得整数n(3~20)Output 程序输出:方阵的上三角部分。要求格式:每个数据宽度为4,右对齐。Sample Inp原创 2017-05-09 17:18:57 · 1620 阅读 · 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-03 09:22:57 · 272 阅读 · 0 评论 -
bfs广搜 胜利大逃亡 HDU - 1253
Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会. 魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能从一个坐标走到相邻的六个坐标中的其中一个.现在给你城堡的地图,请你计原创 2017-08-03 09:48:40 · 334 阅读 · 0 评论 -
zoj 1586 QS Network
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 get connected, they need to buy two network adapters原创 2017-08-03 10:13:44 · 311 阅读 · 0 评论 -
hdu 5253
老 Jack 有一片农田,以往几年都是靠天吃饭的。但是今年老天格外的不开眼,大旱。所以老 Jack 决定用管道将他的所有相邻的农田全部都串联起来,这样他就可以从远处引水过来进行灌溉了。当老 Jack 买完所有铺设在每块农田内部的管道的时候,老 Jack 遇到了新的难题,因为每一块农田的地势高度都不同,所以要想将两块农田的管道链接,老 Jack 就需要额外再购进跟这两块农田高度差相等长度的管道。原创 2017-08-03 10:34:21 · 282 阅读 · 0 评论 -
zoj 1203
There exists a world within our world A world beneath what we call cyberspace. A world protected by firewalls, passwords and the most advanced security systems. In this world we hide our d原创 2017-08-03 10:41:13 · 323 阅读 · 0 评论 -
hdu 1863 畅通工程
省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。 Input测试输入包含若干测试用例。每个测试用例的第1行给出评估的道路条数 N、村庄数目M ( 行对应村庄间道路的成本,每行给出一对正整数,分别是原创 2017-08-03 10:48:07 · 291 阅读 · 0 评论 -
hdu 2682
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 prime number,or VB is a prime number or (VA+VB) is a prime原创 2017-08-03 10:58:02 · 368 阅读 · 0 评论 -
hdu 3262
Problem DescriptionStudents often have problems taking up seats. When two students want the same seat, a quarrel will probably begin.It will have very bad effect when such subjects occur on原创 2017-10-08 13:41:45 · 351 阅读 · 0 评论