[BZOJ4103][Thu Summer Camp 2015]异或运算 试题描述 给定长度为n的数列X={x1,x2,...,xn}和长度为m的数列Y={y1,y2,...,ym},令矩阵A中第i行第j列的值Aij=xi xor yj,每次询问给定矩形区域i∈[u,d],j∈[l,r],找出第k大 ...
分类:
其他好文 时间:
2017-04-21 09:36:59
阅读次数:
216
Average Score Time Limit: 2 Seconds Memory Limit: 65536 KB Bob is a freshman in Marjar University. He is clever and diligent. However, he is not good ...
分类:
其他好文 时间:
2017-04-21 09:21:07
阅读次数:
239
1433: [ZJOI2009]假期的宿舍 Description Input Output Sample Input 1 3 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 Sample Output ? ? HINT 对于30% 的数据满足1 ≤ n ≤ 12。对于100% 的数据满 ...
分类:
其他好文 时间:
2017-04-21 00:28:45
阅读次数:
191
最长上升子序列 一个数的序列 a i ,当 a 1 < a 2 < # < a N 时,称这个序列是上升的。对于给定的一个序列 ( a 1 , a 2 ,# , a N ),可以得到一些上升子序列( a i1 , a i 2 ,# , a iK ),这里 1 ≤ i1 < i 2 < # < iK ...
分类:
其他好文 时间:
2017-04-21 00:05:24
阅读次数:
211
Description \(n\)个城市,\(k\)个国家,\(m\)条边,边两边至少有一个首都,问是否存在合法解。\(1\leqslant k\leqslant n,m\leqslant 10^6\) Solution 2-SAT. 有几个限制条件一起列上... 这样建图是\(O(n^2)\)的. ...
分类:
其他好文 时间:
2017-04-20 23:08:19
阅读次数:
201
Problem You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an interna ...
分类:
其他好文 时间:
2017-04-20 22:57:08
阅读次数:
257
后缀数组+二分 1. 从后往前贪心扫 当必须分的时候就分一段 注意比较两个串大小时的细节 2. 先二分这个串第一次出现时在后缀数组上的位置 再二分具体是哪个串 从前往后扫,使右端点不断往左缩,当 右<=左 时分一段 快的飞起 1. 2. ...
分类:
其他好文 时间:
2017-04-20 10:18:11
阅读次数:
112
来自FallDream的博客,未经允许,请勿转载,谢谢。 n<=2000 bitset优化floyd , 枚举k,枚举i,如果i能到k,那么i的bitset直接或上k的。复杂度$O(\frac{n^{3}}{32})$ ...
分类:
Web程序 时间:
2017-04-19 10:01:02
阅读次数:
202
Martian Addition Time Limit: 2 Seconds Memory Limit: 65536 KB In the 22nd Century, scientists have discovered intelligent residents live on the Mars. ...
分类:
其他好文 时间:
2017-04-19 09:56:20
阅读次数:
209
Description Bob有一棵n个点的有根树,其中1号点是根节点。Bob在每个点上涂了颜色,并且每个点上的颜色不同。定义一条路 径的权值是:这条路径上的点(包括起点和终点)共有多少种不同的颜色。Bob可能会进行这几种操作: 1 x: 把点x到根节点的路径上所有的点染上一种没有用过的新颜色。 2 ...
分类:
其他好文 时间:
2017-04-18 18:23:29
阅读次数:
182