VK Cup 2016 - Round 1 E. Bear and Contribution(贪心)

题意: $N,K\le 2\times 10^5,给定N个数,现在要使其中至少K个数变得相同$$b,c\le 1000,其中增加5的代价是b,增加1的代价是c$     Read more
TaoSama's avatar
TaoSama Mar 30, 2016

VK Cup 2016 - Round 1 D. Bear and Polynomials(哈希)

题意: $N\le 2\times 10^5,给定一个N次多项式,即P(x)=\sum_{i=0}^N a_i\cdot x^i$$已经P(2)\neq 0,现要改变其中一个系数a_i,使得P’(2)=0$$求方法数$     Read more
TaoSama's avatar
TaoSama Mar 29, 2016

Educational Codeforces Round 10 E. Pursuit For Artifacts(边双连通缩点)

题意: $N,M\le 3\times 10^5,N个点,M条边的无向图,无重边自环$$边权为0或1,问s\to t是否存权\ge 1且每条边经过一次的一条路径$     Read more
TaoSama's avatar
TaoSama Mar 28, 2016

Educational Codeforces Round 10 D. Nested Segments(离线思想、BIT)

题意: $N \le 2\times 10^5个线段,问第i个线段包含多少个其它线段$     Read more
TaoSama's avatar
TaoSama Mar 28, 2016

Educational Codeforces Round 10 C. Foe Pairs(离线思想、贪心)

题意: $N,M\le 3\times 10^5,N个数,M个非法数对(a_i,b_i)$$求不包含任何非法数对的区间个数$     Read more
TaoSama's avatar
TaoSama Mar 28, 2016

UVA 10968 KuPellaKes(贪心、最短路)

题意: $N\le 2000个点的图,无重边自环,现要删去一些边$$使得所有的点都是正偶度,保证图最多有2个奇度点$$输出满足要求的要删去的最少的边,不能输出Poor Koorosh$     Read more
TaoSama's avatar
TaoSama Mar 28, 2016

HDU 5324 Boring Class(LIS、二维分块)

题意: $N\le 5\times 10^4,给定2个长度为N的序列,A_i,B_i$$现要选出对于2个序列同样的子序列,假设下标为p_1\le p_2\le \dots\le p_m$$满足A_{p_1}\ge A_{p_2}\dots\ge A_{p_m}, 且B_{p_1}\ge B_{p_2}\dots\ge B_{p_m}$$求最长的这样的子序列,打印下标,多解输出字典序最小解$     Read more
TaoSama's avatar
TaoSama Mar 28, 2016

HDU 5323 Solve this interesting problem(dfs)

题意: $给定总区间为[0, N]的线段树的一个区间[L, R],0\le L,R\le10^9,\frac{L}{R-L+1} \leq 2015$$求最小的包含这个[L, R]的线段树的N$     Read more
TaoSama's avatar
TaoSama Mar 28, 2016

HDU 5318 The Goddess Of The Moon(dp、矩阵快速幂)

题意: $N\le 50,M\le 10^9,N个字符串,选出M个拼接到一起$$(i, j)拼接的条件是i的后缀和j的前缀的公共长度\ge 2$$问拼接成不同的字符串的个数,答案对10^9+7取模$     Read more
TaoSama's avatar
TaoSama Mar 28, 2016

HDU 4651 Partition(五边形数)

题意: $N\le 10^5,求整数N的划分数是多少,答案对10^9+7取模$     Read more
TaoSama's avatar
TaoSama Mar 28, 2016