随笔分类 - 水题
2013年第四届蓝桥杯——黄金连分数java
摘要:标题: 黄金连分数 黄金分割数0.61803... 是个无理数,这个常数十分重要,在许多工程问题中会出现。有时需要把这个数字求得很精确。 对于某些精密工程,常数的精度很重要。也许你听说过哈勃太空望远镜,它首次升空后就发现了一处人工加工错误,对那样一个庞然大物,其实只是镜面加工时有比头发丝...
阅读全文
蓝桥杯 算法提高 6-17复数四则运算 java
摘要:设计复数库,实现基本的复数加减乘除运算。 输入时只需分别键入实部和虚部,以空格分割,两个复数之间用运算符分隔;输出时按a+bi的格式在屏幕上打印结果。参加样例输入和样例输出。 注意考虑特殊情况,无法计算时输出字符串"error"。样例输入2 4 * -3 2样例输出-14-8i样例输入3 -...
阅读全文
2014第五届蓝桥杯JAVA本科B组_猜字母
摘要://标题:猜字母//把abcd...s共19个字母组成的序列重复拼接106次,得到长度为2014的串。//接下来删除第1个字母(即开头的字母a),以及第3个,第5个等所有奇数位置的字母。//得到的新串再进行删除奇数位置字母的动作。如此下去,最后只剩下一个字母,请写出该字母。//答案是一个小写字母,请...
阅读全文
(转)poj2109-Power of Cryptography
摘要:Power of CryptographyDescriptionCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers among t...
阅读全文
第一届山东ACM-Greatest Number
摘要:Greatest NumberDescriptionSaya likes math, because she think math can make her cleverer.One day, Kudo invited a very simple game:Given N integers, the...
阅读全文
2012山东省ACM省赛-Pixel density
摘要:Pixel density题目描述Pixels per inch (PPI) or pixel density is a measurement of the resolution of devices in various contexts; typically computer displays...
阅读全文
△POJ1328--Radar Installation(贪心)
摘要:Radar InstallationDescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is...
阅读全文
△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...
阅读全文
浙公网安备 33010602011771号