04 2014 档案
△2013山东省ACM竞赛-Alice and Bob
摘要:Alice and BobDescriptionAlice and Bob like playing games very much.Today, they introduce a new game.There is a polynomial like this: (a0*x^(2^0)+1) * ...
阅读全文
UVA644 - Immediate Decodability
摘要: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 ...
阅读全文
UVA409 - Excuses, Excuses!
摘要: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 ...
阅读全文
UVA10361 - Automatic Poetry
摘要:Automatic Poetry“Oh God”, Lara Croft exclaims, “it’sone of these dumb riddles again!”In Tomb Raider XIV, Lara is, as ever, gunning her way through anc...
阅读全文
△UVA10494 - If We Were a Child Again(大数和整型数的除法、取余)
摘要:If We Were a Child Again“Oooooooooooooooh!If I could do the easy mathematics like my school days!!I can guarantee, that I’d not make any mistake this ...
阅读全文
△UVA465 - Overflow(判断大数相加相乘是否会溢出)
摘要:OverflowWrite a program that reads an expression consisting of two non-negative integer and an operator. Determine if either integer or the result of ...
阅读全文
△UVA10106 - Product(大数乘法)
摘要:ProductThe ProblemThe problem is to multiply two integers X, Y. (0 2 #include 3 4 #define maxn 2005 5 6 int main() 7 { 8 char a[maxn],b[maxn]; 9...
阅读全文
△UVA424 - Integer Inquiry(大数相加)
摘要:Integer InquiryOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and h...
阅读全文
阶乘的精确值
摘要:阶乘的精确值输入不超过1000的正整数n,输出n!的精度结果。样例输入:30样例输出:265252859812191058636308480000000 1 #include 2 #include 3 4 #define maxn 3000 5 6 int f[maxn]; 7 8 int m...
阅读全文
小学生算术
摘要:小学生算术描述很多小学生在学习加法时,发现“进位”特别容易出错。你的任务是计算两个三位数在相加时需要多少次进位。你编制的程序应当可以连续处理多组数据,直到读到两个0(这是输入结束标记)。输入输入两个正整数m,n.(m,n,都是三位数)输出输出m,n,相加时需要进位多少次。样例输入123 456555...
阅读全文
UVA156 - Ananagrams(同白皮书的例子:字母重排)
摘要:AnanagramsMost crossword puzzle fans are used toanagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POT...
阅读全文
△UVA120 - Stacks of Flapjacks
摘要:Stacks of FlapjacksBackgroundStacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, ope...
阅读全文
uva299 - Train Swapping
摘要:Train SwappingAt an old railway station, you may still encounter one of the last remaining ``train swappers''. A train swapper is an employee of the r...
阅读全文
uva152 - Tree's a Crowd
摘要:Tree's a CrowdDr William Larch, noted plant psychologist and inventor of the phrase ``Think like a tree--Think Fig'' has invented a new classification...
阅读全文
uva10474 - Where is the Marble?
摘要:Where is the Marble?Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju woul...
阅读全文
uva-10420 - List of Conquests
摘要:List of ConquestsIn Act I, Leporello is telling Donna Elvira about his master's long list of conquests:``This is the list of the beauties my master ha...
阅读全文
uva-340 - Master-Mind Hints
摘要:Master-Mind HintsMasterMind 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...
阅读全文
白皮书-字母重排
摘要:字母重排样例输入:tarp given score refund only trap work earn course pepper part******resco nfudre aptr sett oresuc样例输出:scorerefundpart tarp trap:(course题目要求:输...
阅读全文
白皮书-6174问题
摘要:6174问题样例输入:1234样例输出:1234-> 3087-> 8352-> 6174-> 6174(4321-1234=3087,8730-378=8352,8532-2358=6174) ↑ ↑ 将3087从大到小排序 再反转 1 #include...
阅读全文
uva401 - Palindromes
摘要: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
阅读全文
uva10115 - Automatic Editing
摘要:Automatic EditingText-processing tools likeawkandsedallow you to automatically perform a sequence of editing operations based on a script. For this pr...
阅读全文