(1)"1 x y c",代表 把区间 [x,y] 上的值全部加c (2)"2 x y c",代表 把区间 [x,y] 上的值全部乘以c (3)"3 x y c" 代表 把区间 [x,y]上的值全部赋值为c (4)"4 x y p" 代表 求区间 [x,y] 上值的p次方和1<=p<=3 维护sum1[], sum2[], sum3[]分别为一次方.二次方.三次方的和 因为P只有1到3,(x+c)^2=(x^2)+…
Balanced Lineup Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 32820 Accepted: 15447 Case Time Limit: 2000MS Description For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer Joh…
I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 33726 Accepted Submission(s): 13266 Problem Description 很多学校流行一种比较的习惯.老师们很喜欢询问,从某某到某某当中,分数最高的是多少.这让很多学生很反感. 不管你喜不喜欢,现在需要你做的是,就是按照老师的要…
Transformation Time Limit: 15000/8000 MS (Java/Others) Memory Limit: 65535/65536 K (Java/Others) Total Submission(s): 4095 Accepted Submission(s): 1008 Problem Description Yuanfang is puzzled with the question below: There are n integers, a1,…
Level up Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3973 Accepted Submission(s): 1104 Problem Description Level up is the task of all online games. It's very boooooooooring. There is o…
Under Attack Time Limit: 10 Seconds Memory Limit: 65536 KB Doctor serves at a military air force base. One day, the enemy launch a sudden attack and the base is under heavy fire. The fighters in the airport must take off to intercept enemy bo…
1511: [POI2006]OKR-Periods of Words Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 351 Solved: 220[Submit][Status][Discuss] Description 一个串是有限个小写字符的序列,特别的,一个空序列也可以是一个串. 一个串P是串A的前缀, 当且仅当存在串B, 使得 A = PB. 如果 P A 并且 P 不是一个空串,那么我们说 P 是A的一个proper前缀. 定义Q 是A…
You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6425 Accepted Submission(s): 3099 Problem Description Many geometry(几何)problems were designed in the ACM/I…
题意 分析 动态加点线段树,标记永久化好写常数小 Code #include<bits/stdc++.h> #define fi first #define se second #define lson l,mid,p<<1 #define rson mid+1,r,p<<1|1 #define pb push_back #define ll long long using namespace std; const ll inf=1e18; const int mod=…