文章分类 -  UVA

摘要:问题描述:There is an objective test result such as ``OOXXOXXOOO". An `O' means a correct answer of a problem and an `X' means a wrong answer. The score of... 阅读全文
posted @ 2015-12-03 22:47 小图书馆 阅读(65) 评论(0) 推荐(0)
摘要:问题描述:MasterMind is a game for two players. One of them,Designer, selects a secret code. The other,Breaker, tries to break it. A code is no more than a... 阅读全文
posted @ 2015-12-03 22:33 小图书馆 阅读(73) 评论(0) 推荐(0)
摘要:问题描述:Some DNA sequences exist in circular forms as in the following figure, which shows a circular sequence ``CGAGTCAGCT", that is, the last symbol ``... 阅读全文
posted @ 2015-12-03 20:45 小图书馆 阅读(116) 评论(4) 推荐(0)
摘要:问题描述:For a positive integerN, the digit-sum ofNis defined as the sum ofNitself and its digits. WhenMis the digitsum ofN, we callNageneratorofM.For exa... 阅读全文
posted @ 2015-12-01 19:28 小图书馆 阅读(72) 评论(0) 推荐(0)
摘要:问题描述:输入一串字符判断它是否为回文串,镜像串。CharacterReverseCharacterReverseCharacterReverseAAMMYYBNZ5COO11DP2SE3Q3EFR4GS25ZHHTT6IIUU7JLVV88KWW9LJXX输入:每行输入一串字符输出:STRINGC... 阅读全文
posted @ 2015-12-01 14:17 小图书馆 阅读(58) 评论(0) 推荐(0)
摘要:问题描述:将字符串中的前引号变成`` , 后引号变成''。输入:多行输入,并且保证输入的引号成对出现输出:转变后的字符串,逐行输出解题思路:逐字符遍历,利用标记判断前引号和后引号AC:#include "cstdio"int main(int argc, char const *argv[]){ ... 阅读全文
posted @ 2015-11-30 20:44 小图书馆 阅读(59) 评论(0) 推荐(0)
摘要:问题描述:将输入的字符转换成键盘上该字符左边的字符输入:逐行输入字符串(不包括Q,A,Z和Tab, BackSp, Control, 等), 其中字母都是大写字符输出:输出转化后的字符串解题思路:利用常数数组存储各个字符AC:#include "cstdio"const char s[] = {"`... 阅读全文
posted @ 2015-11-30 20:44 小图书馆 阅读(66) 评论(0) 推荐(0)