二分
veit sun
这个作者很懒,什么都没留下…
展开
-
H - Strange fuction
Now, here is a fuction: F(x) = 6 * x7+8*x6+7x3+5*x2-yx (0 <= x <=100) Can you find the minimum value when x is between 0 and 100. Input The first line of the input contains an integer T(1<=T<=100) which means the number of test cases. Then T li原创 2021-03-27 11:24:47 · 55 阅读 · 0 评论 -
E - Can you solve this equation?
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<=T<=100) which means the number of test cases. Then T lines foll原创 2021-03-27 10:33:55 · 122 阅读 · 0 评论 -
J - 查找最接近的元素
在一个非降序列中,查找与给定值最接近的元素。 Input 第一行包含一个整数n,为非降序列长度。1 <= n <= 100000。 第二行包含n个整数,为非降序列各元素。所有元素的大小均在0-1,000,000,000之间。 第三行包含一个整数m,为要询问的给定值个数。1 <= m <= 10000。 接下来m行,每行一个整数,为要询问最接近元素的给定值。所有给定值的大小均在0-1,000,000,000之间。 Output m行,每行一个整数,为最接近相应给定值的元素值,保持输入顺原创 2021-03-26 20:11:40 · 109 阅读 · 0 评论