11 2016 档案

POJ 1852 Ants
摘要:题目的意思是说一个长度为m的杆,上面有n个蚂蚁,告诉每个蚂蚁的初始位置,每个蚂蚁速度都是一样的,问所有的蚂蚁离开杆的最短和最长时间是多少。 模拟题,所有的蚂蚁看成一样的,可以这样理解,即使相撞按反方向走,但是两只蚂蚁从开始爬到相撞到继续相背爬,这个时间都是一样的。所以直接对每只蚂蚁分别处理,得出他的 阅读全文

posted @ 2016-11-21 09:27 泡面小王子 阅读(134) 评论(0) 推荐(0)

Digital Roots 1013
摘要:Digital Roots 时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte总提交:456 测试通过:162 描述 The digital root of a positive integer is found by summing the digits o 阅读全文

posted @ 2016-11-14 21:56 泡面小王子 阅读(193) 评论(0) 推荐(0)

1350. Primary Arithmetic
摘要:Children are taught to add multi-digit numbers from right-to-left one digit at a time. Many find the "carry" operation - in which a 1 is carried from 阅读全文

posted @ 2016-11-12 21:17 泡面小王子 阅读(413) 评论(0) 推荐(0)

Word Reversal
摘要:For each list of words, output a line with each word reversed without changing the order of the words. Input You will be given a number of test cases. 阅读全文

posted @ 2016-11-12 20:06 泡面小王子 阅读(251) 评论(0) 推荐(0)

POJ 2876 Cantoring Along
摘要:Description The Cantor set was discovered by Georg Cantor. It is one of the simpler fractals. It is the result of an infinite process, so for this pro 阅读全文

posted @ 2016-11-11 23:08 泡面小王子 阅读(415) 评论(0) 推荐(0)

逆序数的求法
摘要:求一个数列的逆序数 逆序对:数列s[1],a[2],a[3]…中的任意两个数s[i],s[j] (i<j),如果s[i]>s[j],那么我们就说这两个数构成了一个逆序对 逆序数:一个数列中逆序对的总数 如数列 3 5 4 8 2 6 9 (5,4)是一个逆序对,同样还有(3,2),(5,2),(4, 阅读全文

posted @ 2016-11-07 22:31 泡面小王子 阅读(2475) 评论(0) 推荐(0)

C++ 中cin
摘要:http://www.cnblogs.com/A-Song/archive/2012/01/29/2331204.html 阅读全文

posted @ 2016-11-06 19:36 泡面小王子 阅读(113) 评论(0) 推荐(0)