Sherlock Holmes received a note with some strange strings: "Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm". It took him only a min ...
分类:
其他好文 时间:
2017-11-12 12:37:38
阅读次数:
164
给一个序列,每次操作对这个序列中的所有数异或一个x,问每次操作完以后整个序列的mex值。 做法是去重后构建01字典树,异或x就是对root加一个x的lazy标志,每次pushDown时如果lazy的这一位是1,则交换左右儿子。找mex的话只要每次往左走,如果左子树是满的,则往右走,并且加上左边相应造 ...
分类:
其他好文 时间:
2017-11-11 18:53:36
阅读次数:
225
欢迎访问~原文出处——博客园-zhouzhendong 去博客园看该题解 题目传送门 - POJ2891 题意概括 给出k个同余方程组:x mod ai = ri。求x的最小正值。如果不存在这样的x,那么输出-1.不满足所有的ai互质。 题解 互质就简单,但是不互质就有些麻烦,到现在我还是不大懂。 ...
分类:
其他好文 时间:
2017-11-06 22:59:30
阅读次数:
217
Last years Chicago was full of gangster fights and strange murders. The chief of the police got really tired of all these crimes, and decided to arres ...
分类:
其他好文 时间:
2017-10-28 23:49:28
阅读次数:
177
题目: Strange Game On Matrix Ivan is playing a strange game. He has a matrix a with n rows and m columns. Each element of the matrix is equal to either ...
分类:
其他好文 时间:
2017-10-25 21:46:51
阅读次数:
199
A - BalancePOJ1837 Gigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance.It orders ...
分类:
其他好文 时间:
2017-10-24 01:44:03
阅读次数:
333
I am using java7, spring 3 and mybatis Pom.xml While using annotation based Select i came across with strange issue where below mentioned code was thr ...
分类:
其他好文 时间:
2017-10-20 16:51:32
阅读次数:
249
题意:定义一个新的二进制表达式,即在原来基础上把最大权值修改为2。其次,我们每加一个2^k保证改变数字不超过4次。给定最长数字长度,现在你需模拟这个过程。 思路:不超过4次,说明我们需要维护这个数字列连续为2的不超过3(高位除外),怎么制定策略呢?,我们可以制定这样的策略:保证两个2之间至少有一个0 ...
分类:
其他好文 时间:
2017-10-06 11:33:39
阅读次数:
144
题意:求解模线性同余方程组 解题关键:扩展中国剩余定理求解。两两求解。 $\begin{array}{l}x = {r_1}\bmod {m_1}\\x = {r_2}\bmod {m_2}\end{array}$ 为了代码的符号清晰,将转化后的系数都为正,故如下设方程。 $\begin{array ...
分类:
其他好文 时间:
2017-10-01 17:32:52
阅读次数:
149
题目:http://codeforces.com/problemset/problem/842/D 题意:给你n个数,m次查询,每次将数组全部异或一个数后,求没出现过的最小自然数 要求异或后的最小值我们可以用字典树来解决 而每次对数组异或可以替换每次对异或值异或 之后贪心的选取 每次都走左子树,如果 ...
分类:
其他好文 时间:
2017-09-18 20:32:06
阅读次数:
149