
vjudge
Jenny-z
这个作者很懒,什么都没留下…
展开
-
一、R - Joseph
R - JosephPOJ - 1012 The Joseph's problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, . . ., n, standing in circle every mt...原创 2018-08-08 11:32:43 · 374 阅读 · 0 评论 -
一、D - 不容易系列之(3)―― LELE的RPG难题
D - 不容易系列之(3)―― LELE的RPG难题HDU - 2045 人称“AC女之杀手”的超级偶像LELE最近忽然玩起了深沉,这可急坏了众多“Cole”(LELE的粉丝,即"可乐"),经过多方打探,某资深Cole终于知道了原因,原来,LELE最近研究起了著名的RPG难题:有排成一行的n个方格,用红(Red)、粉(Pink)、绿(Green)三色涂每个格子,每格涂一色,要求任何相邻的...原创 2018-08-06 14:29:52 · 186 阅读 · 0 评论 -
一、C - Edge
C - EdgeHDU - 1033 For products that are wrapped in small packings it is necessary that the sheet of paper containing the directions for use is folded until its size becomes small enough. We assum...原创 2018-08-06 14:26:36 · 678 阅读 · 0 评论 -
一、B - Candy Sharing Game
B - Candy Sharing GameHDU - 1034 A number of students sit in a circle facing their teacher in the center. Each student initially has an even number of pieces of candy. When the teacher blows a whi...原创 2018-08-06 11:25:52 · 209 阅读 · 0 评论 -
一、A - The 3n + 1 problem
A - The 3n + 1 problemHDU - 1032 Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyz...原创 2018-08-06 10:26:46 · 116 阅读 · 0 评论 -
一、Z - A + B Problem II
Z - A + B Problem IIHDU - 1002 I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of the input contains an integ...原创 2018-08-10 10:52:18 · 198 阅读 · 0 评论 -
一、Y - A == B ?
Y - A == B ?HDU - 2054 Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".Inputeach test case contains two numbers A and B.Outputfor each case, if...原创 2018-08-10 10:41:32 · 420 阅读 · 0 评论 -
一、X - Specialized Four-Digit Numbers
X - Specialized Four-Digit NumbersPOJ - 2196 Find and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when repr...原创 2018-08-10 10:30:17 · 272 阅读 · 0 评论 -
一、W - The Circumference of the Circle
W - The Circumference of the CirclePOJ - 2242 To calculate the circumference of a circle seems to be an easy task - provided you know its diameter. But what if you don't?You are given the cartes...原创 2018-08-10 10:21:25 · 249 阅读 · 0 评论 -
一、V - The Fun Number System
V - The Fun Number SystemPOJ - 1023 In a k bit 2's complement number, where the bits are indexed from 0 to k-1, the weight of the most significant bit (i.e., in position k-1), is -2^(k-1), and th...原创 2018-08-10 09:53:35 · 274 阅读 · 0 评论 -
一、E - A + B
E - A + BHDU - 1228 读入两个小于100的正整数A和B,计算A+B.需要注意的是:A和B的每一位数字由对应的英文单词给出.Input测试输入包含若干测试用例,每个测试用例占一行,格式为"A + B =",相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出.Output对每个测试用例输出1行,即A+B的值.Sample Inpu...原创 2018-08-06 18:53:00 · 494 阅读 · 0 评论 -
一、F - Robot Motion
F - Robot MotionHDU - 1035 A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instr...原创 2018-08-06 19:23:22 · 183 阅读 · 0 评论 -
一、G - 请使用sort
G - 请使用sortHDU - 1225 Football is one of the greatest games in the world. Lots of people like to play football. After one season of matches, the header has to calculate the last scores of every te...原创 2018-08-06 19:38:13 · 250 阅读 · 0 评论 -
一、Q - 高精度(大数)n次方
Q - 高精度(大数)n次方POJ - 1001 Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experie...原创 2018-08-08 11:25:28 · 1522 阅读 · 0 评论 -
一、P - Reduced ID Numbers
P - Reduced ID NumbersPOJ - 2769 T. Chur teaches various groups of students at university U. Every U-student has a unique Student Identification Number (SIN). A SIN s is an integer in the range 0...原创 2018-08-08 11:16:57 · 297 阅读 · 0 评论 -
一、O - Dirichlet's Theorem on Arithmetic Progressions
O - Dirichlet's Theorem on Arithmetic ProgressionsPOJ - 3006 If a and d are relatively prime positive integers, the arithmetic sequence beginning with a and increasing by d, i.e., a, a + d, a + 2...原创 2018-08-08 11:10:52 · 161 阅读 · 0 评论 -
一、N - Bullseye
N - BullseyePOJ - 2272 A simple dartboard consists of a flat, circular piece of cork with concentric rings drawn on it. Darts are thrown at the board by players in an attempt to hit the center of...原创 2018-08-08 10:07:43 · 298 阅读 · 0 评论 -
一、M - 枚举答案能不能做?
M - 枚举答案能不能做?HDU - 1013 The 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 ...原创 2018-08-07 17:32:58 · 211 阅读 · 0 评论 -
一、L - Delta-wave
L - Delta-waveHDU - 1030 A triangle field is numbered with successive integers in the way shown on the picture below.The traveller needs to go from the cell with number M to the cell with nu...原创 2018-08-07 17:24:42 · 569 阅读 · 0 评论 -
一、K - next_permutation
K - next_permutationHDU - 1027 Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEelzebub has to beat ...原创 2018-08-07 14:26:32 · 226 阅读 · 0 评论 -
一、J - Ignatius and the Princess IV
J - Ignatius and the Princess IVHDU - 1029 "OK, you are not too bad, em... But you can never pass the next test." feng5166 says."I will tell you an odd number N, and then N integers. There will ...原创 2018-08-07 11:17:10 · 117 阅读 · 0 评论 -
一、I - 辗转相除法求最大公约数 HDU - 1019
I - 辗转相除法求最大公约数HDU - 1019 The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5...原创 2018-08-06 22:14:50 · 162 阅读 · 0 评论 -
一、U - Long Distance Racing
U - Long Distance RacingPOJ - 3672 Bessie is training for her next race by running on a path that includes hills so that she will be prepared for any terrain. She has planned a straight path and ...原创 2018-08-10 09:12:08 · 234 阅读 · 0 评论 -
一、S - Counterfeit Dollar
S - Counterfeit DollarPOJ - 1013 Sally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit even though its color and size...原创 2018-08-09 09:02:07 · 456 阅读 · 0 评论 -
A - 人见人爱A+B
HDOJ上面已经有10来道A+B的题目了,相信这些题目曾经是大家的最爱,希望今天的这个A+B能给大家带来好运,也希望这个题目能唤起大家对ACM曾经的热爱。 这个题目的A和B不是简单的整数,而是两个时间,A和B 都是由3个整数组成,分别表示时分秒,比如,假设A为34 45 56,就表示A所表示的时间是34小时 45分钟 56秒。 Input输入数据有多行组成,首先是一个整数N,表示测试实例的原创 2018-01-18 21:38:22 · 224 阅读 · 0 评论 -
H - 超级楼梯
有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? Input输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(1Output对于每个测试实例,请输出不同走法的数量Sample Input223Sample Output12和小蜜蜂那道题一样,只是简单的斐波那契数列,所以先构造斐波那契数列数列,然后直接输出所需的那原创 2018-01-18 20:21:34 · 804 阅读 · 0 评论 -
T - Switch Game
There are many lamps in a line. All of them are off at first. A series of operations are carried out on these lamps. On the i-th operation, the lamps whose numbers are the multiple of i change the con原创 2018-01-31 18:00:03 · 214 阅读 · 0 评论 -
P - 不容易系列之(4)——考新郎
国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做"考新郎",具体的操作是这样的:首先,给每位新娘打扮得几乎一模一样,并盖上大大的红盖头随机坐成一排; 然后,让各位新郎寻找自己的新娘.每人只准找一个,并且不允许多人找一个. 最后,揭开盖头,如果找错了对象就要当众跪搓衣板... 看来做新郎也不是容易的事情.原创 2018-01-22 17:55:48 · 486 阅读 · 0 评论 -
K - 一只小蜜蜂...
有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。 其中,蜂房的结构如下所示。 Input输入数据的第一行是一个整数N,表示测试实例的个数,然后是N 行数据,每行包含两个整数a和b(0Output对于每个测试实例,请输出蜜蜂从蜂房a爬到蜂房b的可能路线数,每个实例的输出占一行。Sample Input21 2原创 2018-01-13 22:54:08 · 166 阅读 · 0 评论 -
L - 不容易系列之(3)—— LELE的RPG难题
人称“AC女之杀手”的超级偶像LELE最近忽然玩起了深沉,这可急坏了众多“Cole”(LELE的粉丝,即"可乐"),经过多方打探,某资深Cole终于知道了原因,原来,LELE最近研究起了著名的RPG难题:有排成一行的n个方格,用红(Red)、粉(Pink)、绿(Green)三色涂每个格子,每格涂一色,要求任何相邻的方格不能同色,且首尾两格也不同色.求全部的满足要求的涂法.以原创 2017-12-28 10:15:13 · 333 阅读 · 0 评论 -
B - 人见人爱A-B
参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是做集合的减法运算。(当然,大家都知道集合的定义,就是同一个集合中不会有两个相同的元素,这里还是提醒大家一下) 呵呵,很简单吧? Input每组输入数据占1行,每行数据的开始是2个整数n(0如果n=0并且m=0表示输入的结束,不做处理。Output原创 2018-01-18 22:19:01 · 376 阅读 · 1 评论 -
C - 人见人爱A^B
求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1Output对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。 Sample Input2 312 66789 100000 0Sample Output89841这道题的测试数据都是整型,并且只要求输出后三位数字原创 2018-01-18 22:24:55 · 228 阅读 · 0 评论 -
F - 三角形
给定三条边,请你判断一下能不能组成一个三角形。 Input输入数据第一行包含一个数M,接下有M行,每行一个实例,包含三个正数A,B,C。其中A,B,C Output对于每个测试实例,如果三条边长A,B,C能组成三角形的话,输出YES,否则NO。Sample Input21 2 32 2 2Sample OutputNOYES很简单的一道题,坑就在于测试数据的类型不一定是int型,有可能是浮原创 2018-01-18 22:30:03 · 324 阅读 · 0 评论 -
S - Picture
Give you the width and height of the rectangle,darw it. InputInput contains a number of test cases.For each case ,there are two numbers n and m (0 < n,m < 75)indicate the width and height of the recta原创 2018-01-28 22:07:12 · 219 阅读 · 0 评论 -
R - Bitset
Give you a number on base ten,you should output it on base two.(0 InputFor each case there is a postive number n on base ten, end of file.OutputFor each case output a number on base two.将十进制数转化成二进原创 2018-01-28 20:01:00 · 243 阅读 · 0 评论 -
Q - 折线分割平面
我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。Input输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据,每行包含一个整数n(0Output对于每个测试实例,请输出平面的最大分割数,每个实例的输出占一行。Sampl原创 2018-01-28 19:11:23 · 242 阅读 · 0 评论 -
O - 神、上帝以及老天爷
HDU 2006'10 ACM contest的颁奖晚会隆重开始了! 为了活跃气氛,组织者举行了一个别开生面、奖品丰厚的抽奖活动,这个活动的具体要求是这样的: 首先,所有参加晚会的人员都将一张写有自己名字的字条放入抽奖箱中; 然后,待所有字条加入完毕,每人从箱中取一个字条; 最后,如果取得的字条上写的就是自己的名字,那么“恭喜你,中奖了!” 大家可以想象一下当时的气氛之原创 2018-01-20 11:53:47 · 248 阅读 · 0 评论 -
M - 骨牌铺方格
在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数. 例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图: Input输入数据由多行组成,每行包含一个整数n,表示该测试实例的长方形方格的规格是2×n (0Output对于每个测试实例,请输出铺放方案的总数,每个实例的输出占一行。 Sample Input132Sample原创 2018-01-19 19:04:06 · 316 阅读 · 0 评论 -
N - 阿牛的EOF牛肉串
今年的ACM暑期集训队一共有18人,分为6支队伍。其中有一个叫做EOF的队伍,由04级的阿牛、XC以及05级的COY组成。在共同的集训生活中,大家建立了深厚的友谊,阿牛准备做点什么来纪念这段激情燃烧的岁月,想了一想,阿牛从家里拿来了一块上等的牛肉干,准备在上面刻下一个长度为n的只由"E" "O" "F"三种字符组成的字符串(可以只有其中一种或两种字符,但绝对不能有其他字符),阿牛同时禁止在串中出现原创 2018-01-19 19:25:38 · 127 阅读 · 0 评论 -
J - 密码
网上流传一句话:"常在网上飘啊,哪能不挨刀啊~"。其实要想能安安心心地上网其实也不难,学点安全知识就可以。 首先,我们就要设置一个安全的密码。那什么样的密码才叫安全的呢?一般来说一个比较安全的密码至少应该满足下面两个条件: (1).密码长度大于等于8,且不要超过16。 (2).密码中的字符应该来自下面“字符类别”中四组中的至少三组。 这四个字符类别分别为: 1.大写字母:A,B原创 2018-01-19 11:37:37 · 448 阅读 · 0 评论