上一页 1 ··· 6 7 8 9 10 11 下一页
摘要: 题目大意: 给出一个数num和一个进制base 求出num在该base下的末尾0进制和总位数第一部分求末尾0进制: 先求出进制的素因数分解 例如 10=2*5 然后找出找出num的素因数分解 中有多少个 2或者5 由此找出多少个0第二部分求出位数,就是求出 num = base^x 的最大X利用两边去log计算因为精读问题WA了N次。。最后也是看网上的代码解决的orzProblem GHow many zeros and how many digits?Input:standard inputOutput:standard outputGiven a decimal intege... 阅读全文
posted @ 2013-11-18 19:50 doubleshik 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 题目不难但是一开始把 180 °后面 。。结果一直WAClockHandsThe medieval interest in mechanical contrivances is well illustrated by the development of the mechanical clock, the oldest of which is driven by weights and controlled by a verge, an oscillating arm engaging with a gear wheel. It dates back to 1386.Clocks d 阅读全文
posted @ 2013-11-17 00:10 doubleshik 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 一道让我崩溃的题目。。题目非常好理解但是我自己写的时候比较混乱。。最后是模仿着网上的代码写掉的代码里用到 ,第一次知道 用一个vector 的变量 a 用 a.erase() 后仍然可以使整个队列连续。比数组代码上方便。题目: ``Accordian'' PatienceYou are to simulate the playing of games of ``Accordian'' patience, the rules for which are as follows:Deal cards one by one in a row from left to r 阅读全文
posted @ 2013-11-16 21:52 doubleshik 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 题目大意就是求出2维 、 3维 、4维下正方形中正方形和长方形的个数(正方体和超正方体类似)基本就是推出个公式。。正方形是平方和,长方体是 总的长方形个数- 正方形个数 ( 这个想起高中一道数学题比如n条边就用行和列分别选两条边来包围一个长方形 C(2,n+1)*C(2,n+1)。代码里利用了迭代求和。。没有背公式蛋疼的是一开始没有对数组初始化一直WAProblem J(2/3/4)-D Sqr/Rects/Cubes/Boxes?Input:standard inputOutput:standard outputTime Limit:2 secondsYou can see a (4x4) 阅读全文
posted @ 2013-11-16 12:47 doubleshik 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 题目大意就是给出一个字典,找出其中不能通过打乱字母顺序后组成新单词的 那些单词(稍微有点绕)我写的相当繁琐,晚上回去要研究一下stl写法题目:AnanagramsMost crossword puzzle fans are used toanagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POTS and POST. Some words however do not have this attribute, no matter how you re 阅读全文
posted @ 2013-11-13 17:46 doubleshik 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 给出一串表达式,大写是运算符,小写是类似数字,然后要求输出层序遍历先根据表达式建树然后进行层序遍历Problem E: ExpressionsArithmetic expressions are usually written with the operators in between the two operands (which is called infix notation). For example,(x+y)*(z-w)is an arithmetic expression in infix notation. However, it is easier to writ 阅读全文
posted @ 2013-11-13 16:21 doubleshik 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 题目给出 N个天数, X个party数,然后X行是每个PARTY罢工的周期m,计算在N天内一共罢工的天数是多少,一天内如果有一个以上party罢工就算一次题目Problem D: HartalsA social research organization has determined a simple set of parameters to simulate the behavior of the political parties of our country. One of the parameters is a positive integerh(called thehartal pa 阅读全文
posted @ 2013-11-13 14:46 doubleshik 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 给出一个年份,通过和1960进行计算求出第y年的word数。然后求出2^word>n! 的最大的n解法: 因为n!比较大 所以两边先取2的对数word>log(2)1+log(2)2+....log(2)n再利用换底公式 log(2)n=logn/log2 进行累加Problem B: Factstone BenchmarkAmtel has announced that it will release a 128-bit computer chip by 2010, a 256-bit computer by 2020, and so on, continuing i 阅读全文
posted @ 2013-11-11 18:25 doubleshik 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 题目大意:给出上下两条线上点的个数,求出上面的点和下面所有点连线后交点的个数。 不会有两条以上的线交于同一个点。原题:How Many Points of Intersection?We have two rows. There areadots on the top row andbdots on the bottom row. We draw line segments connecting every dot on the top row with every dot on the bottom row. The dots are arranged in such a way that 阅读全文
posted @ 2013-11-11 16:59 doubleshik 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://blog.chinaunix.net/uid-25525723-id-363092.html在此行者们也只能根据自己的实际开发体验,推荐一些常见领域的优秀资源给好奇的读者们;-)以下,使用粗略的领域分类,来展示不同层次相关应用的Python 技术:Py 语言自身就Python语言本身的学习参考资源常备建议放在手边随时看的:Python Tutorial 中文版访问地址:http://wiki.woodpecker.org.cn/moin/March_Liu/PyTutorial精巧地址:http://bit.ly/1rzx1nPython 教程是世上唯一 Guido v 阅读全文
posted @ 2013-10-26 17:17 doubleshik 阅读(455) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 下一页