随笔分类 -  字符串

摘要:IMMEDIATE DECODABILITYTime Limit:1000MSMemory Limit:10000KTotal Submissions:10504Accepted:4971DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all codes are in bin 阅读全文
posted @ 2014-02-01 22:03 ~~Snail~~ 阅读(143) 评论(0) 推荐(0)
摘要:Problem E: Automatic EditingSource file:autoedit.{c,cpp,java,pas}Input file:autoedit.inOutput file:autoedit.outText-processing tools likeawkandsedallow you to automatically perform a sequence of editing operations based on a script. For this problem we consider the specific case in which we want to 阅读全文
posted @ 2014-01-20 17:20 ~~Snail~~ 阅读(200) 评论(0) 推荐(0)
摘要:Immediate DecodabilityAn encoding of a set of symbols is said to beimmediatelydecodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all codes are in binary, that no two codes within a set of codes are the same, that each code has at leas 阅读全文
posted @ 2014-01-20 11:29 ~~Snail~~ 阅读(276) 评论(0) 推荐(0)
摘要:Problem B: Andy's First DictionaryTime limit: 3 secondsAndy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he knows is, well, not quite enough. Instead of thinking up all the words himself, he has a briliant idea. From 阅读全文
posted @ 2014-01-20 09:39 ~~Snail~~ 阅读(570) 评论(0) 推荐(0)
摘要:Problem ADecode the tapeTime Limit: 1 second"Machines take me by surprise with great frequency."Alan TuringYour boss has just unearthed a roll of old computer tapes. The tapes have holes in them and might contain some sort of useful information. It falls to you to figure out what is writte 阅读全文
posted @ 2014-01-19 23:24 ~~Snail~~ 阅读(248) 评论(0) 推荐(0)
摘要: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 program that will search for a list of keywords in 阅读全文
posted @ 2014-01-19 23:09 ~~Snail~~ 阅读(315) 评论(0) 推荐(0)
摘要:Artificial Intelligence?Physics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and understand the problem first!So they don't state a problem like ``U=10V, I=5A, P=?" but rather like ``You have an 阅读全文
posted @ 2014-01-19 22:16 ~~Snail~~ 阅读(190) 评论(0) 推荐(0)
摘要:Problem IAutomatic PoetryInput:standard inputOutput:standard outputTime Limit:2 secondsMemory Limit:32 MB“Oh God”, Lara Croft exclaims, “it’sone of these dumb riddles again!”In Tomb Raider XIV, Lara is, as ever, gunning her way through ancient Egyptian pyramids, prehistoric caves and medival hallway 阅读全文
posted @ 2014-01-19 10:13 ~~Snail~~ 阅读(179) 评论(0) 推荐(0)
摘要:Secret ResearchAt a certain laboratory results of secret research are thoroughly encrypted. A result of a single experiment is stored as an information of its completion:`positive result', `negative result', `experiment failed' or `experiment not completed'The encrypted result consti 阅读全文
posted @ 2014-01-14 11:11 ~~Snail~~ 阅读(224) 评论(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 is a s 阅读全文
posted @ 2014-01-05 10:44 ~~Snail~~ 阅读(220) 评论(0) 推荐(0)
摘要:Where's Waldorf?Given ambyngrid 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 letters 阅读全文
posted @ 2014-01-02 21:38 ~~Snail~~ 阅读(255) 评论(0) 推荐(0)