Last Defence
摘要:Given two integers A and B. Sequence S is defined as follow:• S0 = A•S1 = B• Si = |Si−1 − Si−2| for i ≥ 2Count the number of distinct numbers in S.Inp...
阅读全文
posted @
2015-10-09 18:53
Tinamei
阅读(197)
推荐(0)
String Reduction问题分析
摘要:问题描述:Given a string consisting of a,b and c's, we can perform the following operation: Take any two adjacent distinct characters and replace it with t...
阅读全文
posted @
2015-09-10 08:51
Tinamei
阅读(217)
推荐(0)
Pasha and Tea
摘要:Pasha and Teatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPasha decided to invite his friends ...
阅读全文
posted @
2015-08-06 15:52
Tinamei
阅读(230)
推荐(0)
程序员的恋情
摘要:程序员的恋情时间限制: 1 Sec内存限制: 128 MB提交: 67解决: 15[提交][状态]题目描述Alex love Asd,所以他们经常一起玩游♂戏,今天他们又在玩一个游戏了,有一个圈,圈上有n个点。两人轮流操作,由于Alex比较基,所以总是Alex先手,每次操作能选择一段连续的1至k个点...
阅读全文
posted @
2015-07-30 16:35
Tinamei
阅读(150)
推荐(0)
Radical and array
摘要:Radical and array时间限制: 1 Sec内存限制: 128 MB提交: 46解决: 27[提交][状态]题目描述Radical has an array , he wants the array to have as many equal numbers as possible.He...
阅读全文
posted @
2015-07-30 16:19
Tinamei
阅读(147)
推荐(0)
Shortest path of the king
摘要:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=19980Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Pra...
阅读全文
posted @
2015-07-21 20:41
Tinamei
阅读(228)
推荐(0)
Alex and Number
摘要:Alex and Number时间限制:1 Sec内存限制:128 MB提交:69解决:12[提交][状态]题目描述Alex love Number theory. Today he think a easy problem, Give you number N and L, To calculat...
阅读全文
posted @
2015-07-21 08:41
Tinamei
阅读(218)
推荐(0)
人人都有极客精神
摘要:http://www.jisuanke.com/minicourse/59/438人人公司是一家极为鼓励极客精神的公司,当有重要的项目需要上线但又时间太紧,甚至需要当天上线的时候,往往会挂起海盗旗开启电子日期显示,让大家可以在对时间有更明确的感知的情况下,同心协力搞定重要的项目。海盗旗下方的电子屏显...
阅读全文
posted @
2015-07-19 08:43
Tinamei
阅读(849)
推荐(0)
循环移位
摘要:对于渣渣来说,什么都是值得思考的。循环移位,有n个整数,使前面各数顺序向后移动k个位置,移出的数再从开头移入。题目就是把n个数围成一个环,分别把数往后移k个位置。代码实现:for (i=0; i 2 #include 3 4 void ringShift(int *a, int n, int k...
阅读全文
posted @
2015-03-31 14:56
Tinamei
阅读(375)
推荐(0)