二分
凌晨四点的洛杉矶fly
这个作者很懒,什么都没留下…
展开
-
二分+贪心
Nura wants to buy k gadgets. She has only s burles for that. She can buy each gadget for dollars or for pounds. So each gadget is selling only for some type of currency. The type of currency and the c...原创 2019-01-15 10:59:57 · 376 阅读 · 0 评论 -
牛客二分
链接:https://ac.nowcoder.com/acm/contest/372/B来源:牛客网某天,一只可爱的小兔砸在路上蹦蹦跳跳地走着,怪人PM6出现了,于是小兔子被盯上了。PM6:“免子。哦不,小兔子。你长得真好…不对,真可爱。我这里有一道很容易很容易的题目,答对了我就请你吃萝卜,答错了你就请我吃兔肉,好不好呀~~?”小兔砸:“萝卜!?好呀好呀好呀。”于是笨笨的兔纸入套...原创 2019-03-30 18:59:41 · 71 阅读 · 0 评论 -
poj2456
Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000).His C (2 <= C &...原创 2019-02-12 19:57:27 · 553 阅读 · 0 评论 -
poj3273
Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the exact amount of money (1 ≤ moneyi ≤ 10,000) that h...原创 2019-02-12 19:30:59 · 276 阅读 · 0 评论 -
poj2785
The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b + c + d = 0 . In the followin...原创 2019-02-12 17:14:10 · 205 阅读 · 0 评论 -
01串左右移能否有一列全为1
You are given a table consisting of n rows and m columns. Each cell of the table contains a number, 0 or 1. In one move we can choose some row of the table and cyclically shift its values either one c...原创 2019-02-12 17:10:55 · 180 阅读 · 0 评论 -
map
A new e-mail service "Berlandesk" is going to be opened in Berland in the near future. The site administration wants to launch their project as soon as possible, that's why they ask you to help. You'r...原创 2019-02-12 13:54:14 · 110 阅读 · 0 评论 -
hdu5358
soda has an integer array a1,a2,…,ana1,a2,…,an. Let S(i,j)S(i,j) be the sum of ai,ai+1,…,ajai,ai+1,…,aj. Now soda wants to know the value below:∑i=1n∑j=in(⌊log2S(i,j)⌋+1)×(i+j)∑i=1n∑j=in(⌊log2S(i,j...原创 2019-02-17 21:06:20 · 318 阅读 · 0 评论 -
二分(解方程,求导)
Now, 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 first line of the input contains an intege...原创 2019-02-16 20:11:11 · 723 阅读 · 0 评论 -
poj2018(二分+最大连续子段最大平均值)
DescriptionFarmer John's farm consists of a long row of N (1 <= N <= 100,000)fields. Each field contains a certain number of cows, 1 <= ncows <= 2000.FJ wants to build a fence around a...原创 2019-06-09 11:08:43 · 836 阅读 · 0 评论