转载至此仅作存档,建议访问原文链接查看。 ______ 很早前写的那篇线段树专辑至今一直是本博客阅读点击量最大的一片文章,当时觉得挺自豪的,还去PKU打广告,但是现在我自己都不太好意思去看那篇文章...
Vasya and String(尺取法)
High school student Vasya got a string of length n as a birthday present. This string consists of letters 'a' and 'b' only. Vasya denotes beauty of the string as the maximum length of a...
二分法,三分法,尺取法
二分法 二分法的主要内容就是对一个单调的区间进行二分,可以在很低的时间内快速确定答案的位置。 首先确定一个左端点和右端点,即可以得到一个中点mid=(L+R)/2 ,二分之后需要对中间点进行judge,进行正义的...
NPY and shot (物理题)
NPY is going to have a PE test.One of the test subjects is throwing the shot.The height of NPY is H meters.He can throw the shot at the speed of v0 m/s and at the height of exactly H meters...
Cable master (深坑)
Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It was de...
The Meeting Place Cannot Be Changed (codeforces 782B)(二分法)
题目: The main road in Bytecity is a straight line from south to north. Conveniently, there are coordinates measured in meters from the southernmost building in north direction. ...
Can you solve this equation?
Now,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. InputThe first line of the input contains an integer T(...
Right turn SCU – 4445
Right turn frog is trapped in a maze. The maze is infinitely large and divided into grids. It also consists of \(n\) obstacles, where the \(i\)-th obstacle lies in grid \((x_i, y_i)\). ...
使用单调队列优化的 O(nm) 多重背包算法 (转)
最近在翻看国家队集训论文的时候发现提到了使用单调队列来优化多重背包,于是找到了这个博文,觉得不错,转发过来慢慢理解 解析 令 c[i] = min(num[i], j / v[i]) f[i][j] = max(f[i-1][j-k*v[i]] + k*w[i...
Charm Bracelet POJ – 3624 (01背包问题)
Version:1.0 StartHTML:000000193 EndHTML:000002773 StartFragment:000000845 EndFragment:000002715 StartSelection:000000845 EndSelection:000002715 SourceURL:http://poj.org/problem?id=36243624 -- Charm...