![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
分块
tomjobs
别慌,慌也没用
展开
-
Codeforces1406 E. Deleting Numbers(交互,素数,分块)
This is an interactive problem. There is an unknown integer ???? (1≤????≤????). You want to find ????. At first, you have a set of integers {1,2,…,????}. You can perform the following operations no more than 10000 times: A ????: find how many numbers are m原创 2020-09-16 18:28:56 · 184 阅读 · 0 评论 -
2020杭电多校第一场 Finding a MEX(分块+树状数组,维护MEX)
Problem Description Given an undirected graph G=(V,E). All vertices are numbered from 1 to N. And every vertex u has a value of Au. Let Su={Av│(u,v)∈E}. Also, F(u) equals MEX(minimum excludant) value of Su. A MEX value of a set is the smallest non-negative原创 2020-07-26 22:34:13 · 326 阅读 · 0 评论 -
ICPC Central Europe Regional Contest 2019 Saba1000kg(并查集分块)
There are many different streams in Viking rock movement. Old Icelandic granite rock, Middle Danish dusty Viking rock, Late Finngail dark green rock, Fjord boulder avalanche rock, and many others, a complete list of all popular streams would overflow this原创 2020-06-21 21:56:41 · 560 阅读 · 0 评论 -
AcWing 249. 蒲公英(求区间众数)
在乡下的小路旁种着许多蒲公英,而我们的问题正是与这些蒲公英有关。 为了简化起见,我们把所有的蒲公英看成一个长度为 n 的序列a1,a2,…,an,其中ai为一个正整数,表示第 i 棵蒲公英的种类编号。 而每次询问一个区间 [l,r] ,你需要回答区间里出现次数最多的是哪种蒲公英,如果有若干种蒲公英出现次数相同,则输出种类编号最小的那个。 输入格式 第一行两个整数n,m,表示有 n 株蒲公英,m 次...原创 2020-02-18 16:23:52 · 355 阅读 · 0 评论 -
A Simple Problem with Integers POJ - 3468(分块模板)
给定一个长度为N的数列A,以及M条指令,每条指令可能是以下两种之一: 1、“C l r d”,表示把 A[l],A[l+1],…,A[r] 都加上 d。 2、“Q l r”,表示询问 数列中第 l~r 个数的和。 对于每个询问,输出一个整数表示答案。 输入格式 第一行两个整数N,M。 第二行N个整数A[i]。 接下来M行表示M条指令,每条指令的格式如题目描述所示。 输出格式 对于每个询问,输出一个...原创 2020-02-17 17:35:08 · 158 阅读 · 0 评论