- 博客(7)
- 收藏
- 关注
原创 练习3-M
题目:Problem M Problem Description有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛?Input输入数据由多个测试实例组成,每个测试实例占一行,包括一个整数n(0n=0表示输入数据的结束,不做处理。Output对于每个测试实例,输出在第n年的时候母
2016-04-28 20:20:29 264
原创 练习3-A
题目:Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1
2016-04-27 18:06:11 671
原创 练习2-猜数字
题目:Problem DescriptionA有1数m,B来猜.B每猜一次,A就说"太大","太小"或"对了" 。 问B猜n次可以猜到的最大数。 Input第1行是整数T,表示有T组数据,下面有T行 每行一个整数n (1 ≤ n ≤ 30) Output猜n次可以猜到的最大数 S
2016-04-24 21:55:30 306
原创 练习3-pie
题目:Problem DescriptionMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are comin
2016-04-24 21:39:56 201
原创 练习2- Strange fuction
题目:Problem DescriptionNow, here is a fuction: F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100)Can you find the minimum value when x is between 0 and 100. InputThe fir
2016-04-24 21:32:11 233
原创 练习2-Can you solve this equation?
题目:Can you solve this equation?Problem DescriptionNow,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try your lucky. Input
2016-04-07 23:36:07 341
原创 这就是专题1的总结?
4月4日清明节,准备在最后的时间里再做几道题,提交的时候居然发现,专题一居然结束两天了,欲哭无泪。。。。。。心都碎了 专题一一共做了8道题,其中一道是重题,还有田忌赛马的那一道不知什么地方出了错,做了老长一段时间都没做出来。 总结一下,贪心算法——求每一步的最优解,把每一步骤的效益最大化。很多题目可以看作时间安排的类型,比如加工木头,对于这一类题的贪心解法,就是分层
2016-04-04 12:00:00 266
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人