题目链接:51nod 1065 最小正子段和 房教说用前缀和做,然后看了别人博客懂了后就感觉,这个真有意思... #include<cstdio> #include<cstring> #include<algorithm> using namespace std; ; const int inf = 0x3f3f3f3f; pair<long long, int> sum[N]; int a[N]; int n; int main(){ int i, j;…
HDU 5224 Tom and paper(最小周长) Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Description There is a piece of paper in front of Tom, its length and width are integer. Tom knows the area of this paper, he wants to know th…
Can you answer these queries? Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5195 Description A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapo…
Rikka with Sequence Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2777 Accepted Submission(s): 503 Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situati…
因为开根号能使数字减小得非常快 所以开不了几次(6次?)很大的数就会变成1..... 所以我们可以维护区间最大值,若最大值>1,则继续递归子树,暴力修改叶节点,否则直接return (好像也可以维护区间被开方的次数,但我不会...QAQ) #include<cstdio> #include<iostream> #include<cmath> #define int long long #define R register int #define ls (tr<…