摘要: 哎,哎,哎。本来以为很简单的题,结果还是WA了一次,RE了两次。题目看似复杂,其实本身很好理解。把' '看成0,‘o’看成1。就是二进制的ascii码。但是,千万不要用数组储存输入,会超时。解决方法就是用getchar()一个一个读取,读满8个就putchar()出来。还有,不能仅用换行符当作输出的判断条件。不然读到第一行和最后一行的时候会输出空字符'\0'。尤其在terminal下,空字符被隐藏起来了。在windows上的命令符貌似是一个空格。oj系统是可以识别出来的。现在编程能力真是挫的一比啊。题目: Problem ADecode the tapeTime 阅读全文
posted @ 2013-01-23 09:29 上白泽慧音 阅读(709) 评论(1) 推荐(0) 编辑
摘要: 需要把excuses数组转换为小写,但是输出的时候要保持原样。因为这个问题WA了很多次。题目:Excuses, Excuses!Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to goofy excuses, Judge Ito has asked that you write a pro 阅读全文
posted @ 2013-01-22 20:03 上白泽慧音 阅读(853) 评论(0) 推荐(0) 编辑
摘要: 说起来感觉自己弱爆了,这道题成了一道跨年题。因为学校考试复习吧,于是拖到现在才AC。以后要抓紧努力了,好久没敲代码开始手生了。本来前一段时间是存着WA的代码的,结果重装Ubuntu就没了。于是WA的原因至今也不清楚,不过参考题解,以后把字符串转换为浮点型储存的时候还是灵活使用math.h里面的数学函数吧。总之,terry要好好努力了,这个状态下学期就是要被虐得满身疮夷了。题目: Artificial Intelligence?Physics teachers in high school often think that problems given as text are more dema 阅读全文
posted @ 2013-01-21 20:17 上白泽慧音 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 题目:Problem IAutomatic Poetry Input: standard inputOutput: standard outputTime Limit: 2 secondsMemory Limit: 32 MB“Oh God”, Lara Croft exclaims, “it’s one of these dumb riddles again!”In Tomb Raider XIV, Lara is, as ever, gunning her way through ancient Egyptian pyramids, prehistoric caves and mediva 阅读全文
posted @ 2012-12-08 21:44 上白泽慧音 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 题目:PalindromesA regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from left to right as when the string is read from right to left. A mirrored string 阅读全文
posted @ 2012-12-04 17:47 上白泽慧音 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 题目: Where's Waldorf?Given a m by n grid of letters, ( ), and a list of words, find the location in the grid at which the word can be found. A word matches a straight, uninterrupted line of letters in the grid. A word can match the letters in the grid regardless of case (i.e. upper and lower case 阅读全文
posted @ 2012-12-04 17:39 上白泽慧音 阅读(339) 评论(0) 推荐(0) 编辑