上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 91 下一页
摘要: The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elev 阅读全文
posted @ 2018-08-01 12:33 王清河 阅读(120) 评论(0) 推荐(0)
摘要: This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each case occupies 2 lines, a 阅读全文
posted @ 2018-07-29 12:03 王清河 阅读(149) 评论(0) 推荐(0)
摘要: Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less t 阅读全文
posted @ 2018-07-29 10:49 王清河 阅读(155) 评论(0) 推荐(0)
摘要: Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest sym 阅读全文
posted @ 2018-07-28 20:59 王清河 阅读(118) 评论(0) 推荐(0)
摘要: Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which cou 阅读全文
posted @ 2018-07-28 20:47 王清河 阅读(124) 评论(0) 推荐(0)
摘要: Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off th 阅读全文
posted @ 2018-07-25 11:03 王清河 阅读(101) 评论(0) 推荐(0)
摘要: 一个数组A中存有N(N&gt0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(M>=0)个位置,即将A中的数据由(A~0~ A~1~……A~N-1~)变换为(A~N-M~ …… A~N-1~ A~0~ A~1~……A~N-M-1~)(最后M个数循环移至最前面的M个位置)。如果需要考虑 阅读全文
posted @ 2018-07-24 16:05 王清河 阅读(135) 评论(0) 推荐(0)
摘要: 让我们定义 dn 为:dn = pn+1 - pn,其中 pi 是第i个素数。显然有 d1=1 且对于n>1有 dn 是偶数。“素数对猜想”认为“存在无穷多对相邻且差为2的素数”。 现给定任意正整数N (< 105),请计算不超过N的满足猜想的素数对的个数。 输入格式:每个测试输入包含1个测试用例, 阅读全文
posted @ 2018-07-24 16:03 王清河 阅读(348) 评论(0) 推荐(0)
摘要: 卡拉兹(Callatz)猜想已经在1001中给出了描述。在这个题目里,情况稍微有些复杂。 当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对n=3进行验证的时候,我们需要计算3、5、8、4、2、1,则当我们对n=5、8、4、2进行验证的时候,就可以直接判定卡拉兹 阅读全文
posted @ 2018-07-24 16:00 王清河 阅读(150) 评论(0) 推荐(0)
摘要: 卡拉兹(Callatz)猜想: 对任何一个自然数n,如果它是偶数,那么把它砍掉一半;如果它是奇数,那么把(3n+1)砍掉一半。这样一直反复砍下去,最后一定在某一步得到n=1。卡拉兹在1950年的世界数学家大会上公布了这个猜想,传说当时耶鲁大学师生齐动员,拼命想证明这个貌似很傻很天真的命题,结果闹得学 阅读全文
posted @ 2018-07-24 15:57 王清河 阅读(106) 评论(0) 推荐(0)
上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 91 下一页