SCOI的数位统计问题都好鬼畜……另外这题数据有误,可能l>r…… 这题的预处理很简单,连DP都不用,然而统计的时候恶心死了……我的思路是计算每一位对所有区间的贡献,对于同一个右端点的所有区间其贡献是相同的,然后几个前缀和暴搞一下…… ...
分类:
其他好文 时间:
2017-02-19 10:32:49
阅读次数:
495
以后我也要用传送门! 题意:一些数,选择一个权值最大的异或和不为0的集合 终于有点明白线性基是什么了...等会再整理 求一个权值最大的线性无关子集 线性无关子集满足拟阵的性质,贪心选择权值最大的,用高斯消元判断是否和已选择的线性相关 每一位记录pivot[i]为i用到的行 枚举要加入的数字的每一个二 ...
分类:
其他好文 时间:
2017-02-18 22:52:54
阅读次数:
220
矩阵快速幂。 构造一个矩阵,$a[i][j]$表示一次操作后,$j$会从$i$那里得到水的比例。注意$k=0$的时候,要将$a[i][j]$置为$1$。 ...
分类:
其他好文 时间:
2017-02-16 22:03:55
阅读次数:
225
Wildleopard had fallen in love with his girlfriend for 20 years. He wanted to end the long match for their love and get married this year. He bought a ...
分类:
其他好文 时间:
2017-02-16 17:39:45
阅读次数:
338
In the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China as well as becoming a festival for people ...
分类:
其他好文 时间:
2017-02-16 17:35:13
阅读次数:
221
JAVAMAN is visiting Dream City and he sees a yard of gold coin trees. There are n trees in the yard. Let's call them tree 1, tree 2 ...and tree n. At ...
分类:
其他好文 时间:
2017-02-15 15:08:13
阅读次数:
181
This is a super simple problem. The description is simple, the solution is simple. If you believe so, just read it on. Or if you don't, just pretend t ...
分类:
其他好文 时间:
2017-02-15 14:54:05
阅读次数:
191
You have n computers numbered from 1 to n and you want to connect them to make a small local area network (LAN). All connections are two-way (that is ...
分类:
其他好文 时间:
2017-02-15 14:37:41
阅读次数:
230
秘制神奇上下界网络流%%% 什么什么有(木)源汇可行流什么的,,看不懂(一下纯属个人sb言论) 看了半天知道点,一个点u,从S连到u的流量是全部流入u的下界,u到T是全部流出u的下界和。(进去出来的约一下) 感觉这个的意思就是保持从进入到出来的下界都符合(强行构造相等??),并且如果能满流,则上界也 ...
分类:
其他好文 时间:
2017-02-13 00:14:16
阅读次数:
181
http://www.lydsy.com/JudgeOnline/problem.php?id=1026 (题目链接) 题意 在区间${[A,B]}$有多少个数相邻两个数位上的数之差至少为2。 Solution 数位dp,右转题解:LCF 其中${f[i][0]}$,表示的是第${i}$位为${0} ...