码迷,mamicode.com
首页 >  
搜索关键字:spoj    ( 889个结果
bzoj 2588: Spoj 10628. Count on a tree LCA+主席树
2588: Spoj 10628. Count on a tree Description 给定一棵N个节点的树,每个点有一个权值,对于M个询问(u,v,k),你需要回答u xor lastans和v这两个节点间第K小的点权。其中lastans是上一个询问的答案,初始为0,即第一个询问的u是明文。 ...
分类:其他好文   时间:2017-03-08 22:22:50    阅读次数:136
BZOJ2588 Spoj 10628. Count on a tree
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作。 本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作。 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/转载请注 ...
分类:其他好文   时间:2017-03-04 19:08:18    阅读次数:223
SPOJ MINSUB - Largest Submatrix(二分+单调栈)
http://www.spoj.com/problems/MINSUB/en/ 题意:给出一个n*m的矩阵M,和一个面积k,要使得M的子矩阵M'的最小元素最大并且面积大于等于k,问子矩阵M'的最小元素最大能是多少,并且求出最大的面积。 思路:二分一个最小元素x,转化为判断矩阵M里面是否存在一个子矩阵 ...
分类:其他好文   时间:2017-03-04 18:39:51    阅读次数:283
SPOJ CIRU The area of the union of circles (计算几何)
题意:求 m 个圆的并的面积。 析:就是一个板子题,还有要注意圆的半径为0的情况。 代码如下: ...
分类:其他好文   时间:2017-03-04 14:20:07    阅读次数:281
SPOJ LEXSTR 并查集
题目描述: Taplu and Abhishar loved playing scrabble. One day they thought of inventing a new game using alphabet tiles. Abhishar wrote a string using tile ...
分类:其他好文   时间:2017-03-04 11:34:54    阅读次数:275
BZOJ2616 : SPOJ PERIODNI
长为$A$,宽为$B$的矩阵放$K$个车的方案数$=C(A,K)\times C(B,K)\times K!$。 建立笛卡尔树,那么左右儿子独立,设$f[i][j]$表示$i$子树内放$j$个车的方案数。 合并左右儿子之后,枚举在底部矩形放几个车进行转移即可。 时间复杂度$O(n^3)$。 ...
分类:其他好文   时间:2017-03-01 18:08:25    阅读次数:207
bzoj1982 [Spoj 2021]Moving Pebbles 博弈论
开始还以为要用sg函数。 想了半天想不出来。 后来才发现想错了。 /**************/ 显而易见,当n为偶数并且a[i]可以两两配对时,状态为先手必败。 因为无论你做什么操作对方都可以做另外一个操作来抵消你的操作。 其他情况是先手必胜。你总能通过一步变为先手必败的状态。 ...
分类:其他好文   时间:2017-02-27 21:21:21    阅读次数:173
SPOJ UOFTCG - Office Mates (树的最小路径覆盖)
UOFTCG - Office Mates no tags no tags Dr. Baws has an interesting problem. His N Dr. Baws has an interesting problem. His N graduate students, while f ...
分类:其他好文   时间:2017-02-25 18:58:28    阅读次数:203
SPOJ IITWPC4F - Gopu and the Grid Problem (双线段树区间修改 区间查询)
Gopu and the Grid Problem Gopu is interested in the integer co-ordinates of the X-Y plane (0<=x,y<=100000). Each integer coordinate contain a lamp, in ...
分类:其他好文   时间:2017-02-25 18:54:23    阅读次数:297
SPOJ-CRAN02 - Roommate Agreement(前缀和)
CRAN02 - Roommate Agreement Leonard was always sickened by how Sheldon considered himself better than him. To decide once and for all who is better am ...
分类:其他好文   时间:2017-02-21 01:15:31    阅读次数:213
889条   上一页 1 ... 37 38 39 40 41 ... 89 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!