ACM_分块
DATELOST
I'm curious.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU-1166 分块
Input 第一行一个整数T,表示有T组数据。 每组数据第一行一个正整数N(N<=50000),表示敌人有N个工兵营地,接下来有N个正整数,第i个正整数ai代表第i个工兵营地里开始时有ai个人(1<=ai<=50)。 接下来每行有一条命令,命令有4种形式: (1) Add i j,i和j为正整数,表示第i个营地增加j个人(j不超过30) (2)Sub i j ,i和j为正整数,表...原创 2019-07-19 18:55:08 · 291 阅读 · 0 评论 -
HDU-1754 分块
Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M<5000 ),分别代表学生的数目和操作的数目。 学生ID编号分别从1编到N。 第二行包含N个整数,代表这N个学生的初始成绩,其中第i个数代表ID为i的学生的成绩。 接下来有M行。每一行有一个字符 C (只取’Q’或’U’) ,和两个正整数A,...原创 2019-07-19 19:17:53 · 232 阅读 · 0 评论 -
HDU-4027 分块
Problem Description A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be m...原创 2019-07-19 21:09:52 · 173 阅读 · 0 评论 -
HDU-1540 分块
Problem Description During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay...原创 2019-07-19 22:27:09 · 175 阅读 · 0 评论 -
cf-220B 莫队 //对询问分块
http://codeforces.com/problemset/problem/220/B 155ms #include<bits/stdc++.h> using namespace std; const int N=1e5+5; typedef long long ll; int cnt[N],n,m,id; int pos[N],L=1,R,res,ans[N],block; s...原创 2019-07-20 20:07:59 · 167 阅读 · 0 评论 -
BZOJ-2120 带修莫队
题目 板子 #include<bits/stdc++.h> using namespace std; const int N=5e4+4,M=1e6+6; int a[N],belong[N],cnt[M],ans[N],now[N],res,l=1,R; struct Query{ int l,r,id,t; Query(){} Query(int l,int r,int id...原创 2019-07-21 10:17:50 · 135 阅读 · 0 评论
分享