04 2016 档案
摘要:只深入做了DFS与简单的二分搜索及三分搜索的题。BFS的相关题目及DFS的深入这周补上。 二分 二分查找应该说是无处不在,二分法很简单,比较一个区间(解所在区间)的中点对应的解与要求的解的关系,然后根据此关系缩小解所在的区间(此区间是上一层区间的1/2,所以叫二分法),这篇博客写的比较好。 二分很容
阅读全文
摘要:题目描述 There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 #include#includeusing namespace std;struct floor{ int x; int y;}n1,n2,tem;int n[201],ji...
阅读全文
摘要:题目描述 Mr. West bought a new car! So he is travelling around the city.One day he comes to a vertical corner. The street he is currently in has a width x, the street he wants to turn to has a width y. T...
阅读全文
摘要:题目描述 My 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 coming to my party and ea...
阅读全文
摘要:题目描述 Now, here is a fuction: F(x) = 6 * x^7+8x^6+7x^3+5x^2-yx (0 #include#include#includeusing namespace std;double f_d(double res){ return res*res*res*res *res*res*42 + res*res*res*res*res*48 +...
阅读全文
摘要:题目描述 Now,given the equation 8x^4 + 7x^3 + 2x^2 + 3x + 6 == Y,can you find its solution between 0 and 100;Now please try your lucky. Input The first line of the input contains an integer T(1#include...
阅读全文
摘要:题目描述 FJ is surveying his herd to find the most average cow. He wants to know how much milk this ‘median’ cow gives: half of the cows give as much or more than the median; half give as much or less. ...
阅读全文
摘要:题目描述 Problem Description 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 elevator will stop, in spec...
阅读全文