
c++
文章平均质量分 76
Super灬Lin丶
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU-1995 汉诺塔V
HDU-1995用1,2,…,n表示n个盘子,称为1号盘,2号盘,…。号数大盘子就大。经典的汉诺塔问题经常作为一个递归的经典例题存在。可能有人并不知道汉诺塔问题的典故。汉诺塔来源于印度传说的一个故事,上帝创造世界时作了三根金刚石柱子,在一根柱子上从下往上按大小顺序摞着64片黄金圆盘。上帝命令婆罗门把圆盘从下面开始按大小顺序重新摆放在另一根柱子上。并且规定,在小圆盘上不能放大圆盘,在三根柱...原创 2018-12-19 15:22:22 · 188 阅读 · 0 评论 -
118A String Task
String TaskPetya started to attend programming lessons. On the first lesson his task was to write a simple program. The program was supposed to do the following: in the given string, consisting if up...原创 2018-12-07 20:49:16 · 186 阅读 · 0 评论 -
HDU-2046 骨牌铺方格
HDU-2046在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数.例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图:Input输入数据由多行组成,每行包含一个整数n,表示该测试实例的长方形方格的规格是2×n (0<n<=50)。Output对于每个测试实例,请输出铺放方案的总数,每个实例的输出占一行。Sample Inpu...原创 2018-12-21 17:18:09 · 147 阅读 · 0 评论 -
HDU-1061 Rightmost Digit
HDU-1061Given a positive integer N, you should output the most right digit of N^N.InputThe input contains several test cases. The first line of the input is a single integer T which is the number o...原创 2018-12-21 17:27:16 · 124 阅读 · 0 评论 -
HDU-1013 Digital Roots
Digital RootsThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value...原创 2018-12-21 17:45:17 · 148 阅读 · 0 评论 -
HDU-2049 不容易系列之(4)——考新郎
国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做&quot;考新郎&quot;,具体的操作是这样的:首先,给每位新娘打扮得几乎一模一样,并盖上大大的红盖头随机坐成一排;然后,让各位新郎寻找自己的新娘.每人只准找一个,并且不允许多人找一个.最后,揭开盖头,如果找错了对象就要当众跪搓衣板…看来做新郎也不是容易的事情…假设一共有N对新婚夫妇,其中有M...原创 2019-01-25 11:03:32 · 175 阅读 · 0 评论 -
HDU-1576 A/B
A/B要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。Input数据的第一行是一个T,表示有T组数据。每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 10^9)。Output对应每组数据输出(A/B)%9973。Sample Input2100...原创 2019-01-21 22:01:02 · 98 阅读 · 0 评论 -
Codeforces-460A A. Vasya and Socks
A. Vasya and SocksVasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he goes to school. When he comes home in the evening, Vasya takes off the used sock...原创 2019-01-21 23:43:09 · 223 阅读 · 0 评论 -
Codeforces-318A A. Even Odds
A. Even OddsBeing a nonconformist, Volodya is displeased with the current state of things, particularly with the order of natural numbers (natural number is positive integer number). He is determined...原创 2019-01-21 23:50:34 · 498 阅读 · 0 评论 -
Codeforces-379A A. New Year Candles
A. New Year CandlesVasily the Programmer loves romance, so this year he decided to illuminate his room with candles.Vasily has a candles.When Vasily lights up a new candle, it first burns for an hou...原创 2019-01-21 23:56:14 · 225 阅读 · 0 评论 -
Codeforces-41A A. Translation
The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a litt...原创 2019-01-22 09:35:46 · 312 阅读 · 0 评论 -
Codeforces-136A A. Presents
Little Petya very much likes gifts. Recently he has received a new laptop as a New Year gift from his mother. He immediately decided to give it to somebody else as what can be more pleasant than givin...原创 2019-01-22 09:45:08 · 226 阅读 · 0 评论 -
Codeforces-580A Kefa and First Steps
Kefa and First StepsKefa decided to make some money doing business on the Internet for exactly n days. He knows that on the i-th day (1 ≤ i ≤ n) he makes ai money. Kefa loves progress, that’s why he ...原创 2019-01-22 10:36:25 · 351 阅读 · 0 评论 -
467A George and Accommodation
George and AccommodationGeorge has recently entered the BSUCP (Berland State University for Cool Programmers). George has a friend Alex who has also entered the university. Now they are moving into a...原创 2018-12-07 21:00:02 · 189 阅读 · 0 评论 -
266A Stones on the Table
Stones on the TableThere are n stones on the table in a row, each of them can be red, green or blue. Count the minimum number of stones to take from the table so that any two neighboring stones had d...原创 2018-12-07 21:12:27 · 134 阅读 · 0 评论 -
HDU-2044 一只小蜜蜂
HDU-2044Problem Description有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。其中,蜂房的结构如下所示。Input输入数据的第一行是一个整数N,表示测试实例的个数,然后是N 行数据,每行包含两个整数a和b(0&lt;a&lt;b&lt;50)。Output对于每个测试实例,请输出蜜蜂从蜂房a爬到蜂房b的...原创 2018-12-18 16:33:13 · 143 阅读 · 0 评论 -
CodeForces 1A
Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city’s anniversary, a decision was taken to pave the Square with square granite...原创 2018-12-18 16:23:27 · 164 阅读 · 0 评论 -
Problem-2019 数列有序
Problem-2019Problem Description有n(n&lt;=100)个整数,已经按照从小到大顺序排列好,现在另外给一个整数x,请将该数插入到序列中,并使新的序列仍然有序。Input输入数据包含多个测试实例,每组数据由两行组成,第一行是n和m,第二行是已经有序的n个数的数列。n和m同时为0标示输入数据的结束,本行不做处理。Output对于每个测试实例,输出插入新的元素...原创 2018-12-14 21:24:33 · 325 阅读 · 0 评论 -
Problem-2010 水仙花数
Problem-2010Problem Description春天是鲜花的季节,水仙花就是其中最迷人的代表,数学上有个水仙花数,他是这样定义的:“水仙花数”是指一个三位数,它的各位数字的立方和等于其本身,比如:153=13+53+3^3。现在要求输出所有在m和n范围内的水仙花数。Input输入数据有多组,每组占一行,包括两个整数m和n(100&amp;lt;=m&amp;lt;=n&amp;lt;=999)。...原创 2018-12-14 21:15:33 · 221 阅读 · 0 评论 -
Problem-2091 空心三角形
Problem-2091Problem Description把一个字符三角形掏空,就能节省材料成本,减轻重量,但关键是为了追求另一种视觉效果。在设计的过程中,需要给出各种花纹的材料和大小尺寸的三角形样板,通过电脑临时做出来,以便看看效果。Input每行包含一个字符和一个整数n(0&amp;lt;n&amp;lt;41),不同的字符表示不同的花纹,整数n表示等腰三角形的高。显然其底边长为2n-1。如果遇到...原创 2018-12-14 21:04:31 · 119 阅读 · 0 评论 -
HDU-6292
G著名出题人小Q每次比赛后都会写一份《赛题分析》,包含比赛概况、每题的参考算法以及一些统计数值。对于一道题来说,小Q会统计最短的验题人代码长度(Shortest judge solution)以及赛内参赛队伍最短的AC代码长度(Shortest team solution)。统计验题人代码长度比较容易,因为验题人最多也不会超过20个。但是统计选手代码长度就不容易了,因为大赛区动辄三四百支队伍...原创 2018-12-14 20:51:17 · 166 阅读 · 0 评论 -
HDU-2039 三角形
三角形给定三条边,请你判断一下能不能组成一个三角形。Input输入数据第一行包含一个数M,接下有M行,每行一个实例,包含三个正数A,B,C。其中A,B,C &lt;1000;Output对于每个测试实例,如果三条边长A,B,C能组成三角形的话,输出YES,否则NO。Sample Input21 2 32 2 2Sample OutputNOYES问题链接:https:/...原创 2018-12-09 20:19:02 · 144 阅读 · 0 评论 -
4A Watermelon
WatermelonOne hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the watermelon was weighed, and the scales ...原创 2018-12-09 20:11:10 · 174 阅读 · 0 评论 -
HDU-2101 A + B Problem Too
A + B Problem Toohis problem is also a A + B problem,but it has a little difference,you should determine does (a+b) could be divided with 86.For example ,if (A+B)=98,you should output no for result....原创 2018-12-07 21:36:31 · 161 阅读 · 0 评论 -
HDU-2002 计算球体积
计算球体积根据输入的半径值,计算球的体积。Input输入数据有多组,每组占一行,每行包括一个实数,表示球的半径。Output输出对应的球的体积,对于每组输入数据,输出一行,计算结果保留三位小数。Sample Input11.5Sample Output4.18914.137Hint#define PI 3.1415927问题链接:https://vjudge.net/...原创 2018-12-07 21:31:20 · 133 阅读 · 0 评论 -
HDU-2000 ASCII码排序
ASCII码排序输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。Input输入数据有多组,每组占一行,有三个字符组成,之间无空格。Output对于每组输入数据,输出一行,字符中间用一个空格分开。Sample InputqweasdzxcSample Outpute q wa d sc x z问题链接:https://vjudge.net/probl...原创 2018-12-07 21:26:04 · 115 阅读 · 0 评论 -
HDU1000 A + B Problem
A + B ProblemCalculate A + B.InputEach line will contain two integers A and B. Process to end of file.OutputFor each case, output A + B in one line.Sample Input1 1Sample Output2问题链接:https:/...原创 2018-12-07 21:18:39 · 110 阅读 · 0 评论 -
Codeforces-479A Expression
ExpressionPetya studies in a school and he adores Maths. His class has been studying arithmetic expressions. On the last class the teacher wrote three positive integers a, b, c on the blackboard. The...原创 2019-01-22 10:53:35 · 347 阅读 · 0 评论