流水依依

希望朋友们有个好的身体,开开心心工作与学习。

博客园 首页 新随笔 联系 订阅 管理
上一页 1 ··· 9 10 11 12 13 14 下一页

2013年8月11日 #

摘要: 题目1500:出操队形 时间限制:2 秒 内存限制:128 兆题目描述:在读高中的时候,每天早上学校都要组织全校的师生进行跑步来锻炼身体,每当出操令吹响时,大家就开始往楼下跑了,然后身高矮的排在队伍的前面,身高较高的就要排在队尾。突然,有一天出操负责人想了一个主意,想要变换一下队形,就是当大家都从楼上跑下来后,所有的学生都随机地占在一排,然后出操负责人从队伍中抽取出一部分学生,使得队伍中剩余的学生的身高从前往后看,是一个先升高后下降的“山峰”形状。据说这样的形状能够给大家带来好运,祝愿大家在学习的道路上勇攀高峰。(注,山峰只有一边也符合条件,如1,1、2,2、1均符合条件)输入:输入可能包.. 阅读全文
posted @ 2013-08-11 17:38 流水依依 阅读(349) 评论(0) 推荐(0)

摘要: 题目1528:最长回文子串题目描述:回文串就是一个正读和反读都一样的字符串,比如“level”或者“noon”等等就是回文串。回文子串,顾名思义,即字符串中满足回文性质的子串。给出一个只由小写英文字符a,b,c...x,y,z组成的字符串,请输出其中最长的回文子串的长度。输入:输入包含多个测试用例,每组测试用例输入一行由小写英文字符a,b,c...x,y,z组成的字符串,字符串的长度不大于200000。输出:对于每组测试用例,输出一个整数,表示该组测试用例的字符串中所包含的的最长回文子串的长度。样例输入:ababbbbbabba样例输出:344来源:腾讯2013年实习生招聘二面面试题我想说的话 阅读全文
posted @ 2013-08-11 11:28 流水依依 阅读(330) 评论(0) 推荐(0)

摘要: 题目1527:首尾相连数组的最大子数组和题目描述:给定一个由N个整数元素组成的数组arr,数组中有正数也有负数,这个数组不是一般的数组,其首尾是相连的。数组中一个或多个连续元素可以组成一个子数组,其中存在这样的子数组arr[i],…arr[n-1],arr[0],…,arr[j],现在请你这个ACM_Lover用一个最高效的方法帮忙找出所有连续子数组和的最大值(如果数组中的元素全部为负数,则最大和为0,即一个也没有选)。输入:输入包含多个测试用例,每个测试用例共有两行,第一行是一个整数n(1=#include #include #include #include #... 阅读全文
posted @ 2013-08-11 11:15 流水依依 阅读(359) 评论(0) 推荐(0)

2013年8月10日 #

摘要: Building bridgesProblem DescriptionHululu and Cululu are two pacific ocean countries made up of many islands. These two country has so many years of friendship so they decide to build bridges to connect their islands. Now they want to build the first bridge to connect an island of Hululu and an isla 阅读全文
posted @ 2013-08-10 18:07 流水依依 阅读(313) 评论(0) 推荐(0)

摘要: RobotTime Limit: 8000/4000 MS (Java/Others)Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 148Accepted Submission(s): 40Problem DescriptionMichael has a telecontrol robot. One day he put the robot on a loop with n cells. The cells are numbered from 1 to n clockwise.At first the robot 阅读全文
posted @ 2013-08-10 18:01 流水依依 阅读(381) 评论(0) 推荐(0)

摘要: ShaolinProblem DescriptionShaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every year, trying to be a monk there. The master of Shaolin evaluates a young man mainly by his talent on understanding the Buddism scripture, but fighting skill is also taken into a 阅读全文
posted @ 2013-08-10 17:16 流水依依 阅读(406) 评论(0) 推荐(0)

2013年7月31日 #

摘要: Sad Love StoryTime Limit: 40000/20000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Problem DescriptionThere's a really sad story.It could be about love or about money.But love will vanish and money will be corroded.These points will last forever.So this time it is about points on a 阅读全文
posted @ 2013-07-31 13:20 流水依依 阅读(280) 评论(0) 推荐(0)

摘要: PiecesTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others) Problem DescriptionYou heart broke into pieces.My string broke... 阅读全文
posted @ 2013-07-31 10:45 流水依依 阅读(352) 评论(0) 推荐(0)

2013年7月29日 #

摘要: I-numberTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1610Accepted Submission(s): 661Problem DescriptionThe I-number of x is defined to be an integer y, which satisfied the the conditions below:1.y>x;2.the sum of each digit of y(under base 10 阅读全文
posted @ 2013-07-29 12:21 流水依依 阅读(288) 评论(0) 推荐(0)

2013年7月26日 #

摘要: Warm up 2Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 342Accepted Submission(s): 165Problem Description Some 1×2 dominoes are placed on a plane. Each dominoe is placed either horizontally or vertically. It's guaranteed the dominoes i... 阅读全文
posted @ 2013-07-26 08:41 流水依依 阅读(874) 评论(0) 推荐(0)

上一页 1 ··· 9 10 11 12 13 14 下一页