训练题
Rick~
这个作者很懒,什么都没留下…
展开
-
单词数
单词数Problem Descriptionlily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。Input有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。Output每组只输出一个整数,其单独成行,该整数代表一篇文章...原创 2018-12-12 21:03:08 · 72 阅读 · 0 评论 -
汉字统计
[汉字统计http://acm.hdu.edu.cn/showproblem.php?pid=2030)Problem Description统计给定文本文件中汉字的个数。Input输入文件首先包含一个整数n,表示测试实例的个数,然后是n段文本。Output对于每一段文本,输出其中的汉字的个数,每个测试实例的输出占一行。[Hint:]从汉字机内码的特点考虑~Sample Input...原创 2018-12-13 17:55:34 · 110 阅读 · 0 评论 -
An easy problem
An easy problemProblem Descriptionwe define f(A) = 1, f(a) = -1, f(B) = 2, f(b) = -2, … f(Z) = 26, f(z) = -26;Give you a letter x and a number y , you should output the result of y+f(x).InputOn t...原创 2018-12-13 18:48:35 · 164 阅读 · 1 评论 -
B -Problem B
B -Problem B用1,2,…,n表示n个盘子,称为1号盘,2号盘,…。号数大盘子就大。经典的汉诺塔问题经常作为一个递归的经典例题存在。可能有人并不知道汉诺塔问题的典故。汉诺塔来源于印度传说的一个故事,上帝创造世界时作了三根金刚石柱子,在一根柱子上从下往上按大小顺序摞着64片黄金圆盘。上帝命令婆罗门把圆盘从下面开始按大小顺序重新摆放在另一根柱子上。并且规定,在小圆盘上不能放大圆盘,...原创 2018-12-14 15:03:12 · 76 阅读 · 0 评论 -
Nearly Lucky Number
Nearly Lucky NumberPetya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 74...原创 2018-12-11 18:16:29 · 509 阅读 · 0 评论 -
cAPS LOCK
cAPS LOCKwHAT DO WE NEED cAPS LOCK FOR?Caps lock is a computer keyboard key. Pressing it sets an input mode in which typed letters are capital by default. If it is pressed by accident, it leads to a...原创 2018-12-11 23:48:54 · 248 阅读 · 0 评论