计算一对逆序对的贡献,即在n个数期望要删多少步才能删掉其中的两个数,设f(n)表示此时的期望,则有方程$f[n]=3/4+(\sum_{i=2}^{n}f[i]\cdot c(n-2,i-2))/2^n$,手算(打表)得到f[i]=4/3(代入成立),因此$ans=\sum_{i=1}^{n}(i- ...
                            
                            
                                分类:
其他好文   时间:
2019-07-28 19:51:59   
                                阅读次数:
94
                             
                         
                    
                        
                            
                            
                                    Problem Desciption: 百度翻译后的汉化: 参见博客:https://www.cnblogs.com/zxcoder/p/11253099.html https://blog.csdn.net/Cassie_zkq/article/details/97255683https://bl ...
                            
                            
                                分类:
其他好文   时间:
2019-07-28 15:26:49   
                                阅读次数:
91
                             
                         
                    
                        
                            
                            
                                    Everything Is Generated In Equal Probability $$ Time Limit: 1000 ms\quad Memory Limit: 131072 kB $$ 题意 给出一个 $N$,以相等的概率生成 $n$ 且 $n \in [1, N]$,在以相等的概率生 ...
                            
                            
                                分类:
其他好文   时间:
2019-07-26 11:42:38   
                                阅读次数:
86
                             
                         
                    
                        
                            
                            
                                    18年杭电多校5的e题 链接:http://acm.hdu.edu.cn/showproblem.php?pid=6354 根据题意,第一个以后的圆不会相交,所以思路直接是通过余弦定理计算角度,然后求出弧长,进行加减得出答案。 代码: 1 #include <iostream> 2 #include ...
                            
                            
                                分类:
其他好文   时间:
2019-07-25 20:34:30   
                                阅读次数:
120
                             
                         
                    
                        
                            
                            
                                    题意 给出一个n位序列 a 有m个询问 l r 问在al -ar 之间能选取的最大周长的三角形 比赛的时候 用莫队算法 但是一直超时 (感觉时间复杂度不是特别高呀。。。) 可以用主席树遍历区间最大到最小来找三角形 #include<bits/stdc++.h> using namespace std ...
                            
                            
                                分类:
其他好文   时间:
2019-07-25 00:34:13   
                                阅读次数:
95
                             
                         
                    
                        
                            
                            
                                https://www.youtube.com/watch?v=5PW-_XkNueE This is space, It does not cooperate. At some point, everything going to go south on you. everything's goi ...
                            
                            
                                分类:
其他好文   时间:
2019-07-25 00:28:21   
                                阅读次数:
118
                             
                         
                    
                        
                            
                            
                                A. Another Chess Problem B. Beauty Of Unimodal Sequence C. Coefficient D. Double Tree E. Everything Is Generated In Equal Probability F. Fantastic Mag ...
                            
                            
                                分类:
其他好文   时间:
2019-07-24 19:33:36   
                                阅读次数:
155
                             
                         
                    
                        
                            
                            
                                    . 1005 Everything Is Generated In Equal Probability //#pragma comment(linker, "/STACK:102400000,102400000") #include<iostream> #include<stdio.h> #incl ...
                            
                            
                                分类:
其他好文   时间:
2019-07-24 19:24:37   
                                阅读次数:
72
                             
                         
                    
                        
                            
                            
                                一、find命令:(Windows搜索小工具推荐——Everything) 命令名称:find 命令所在路径:/bin/find 执行权限:所有用户 语法:find [搜索范围] [匹配条件] 功能描述:文件搜索 二、find命令的例子: 1、find /etc -name init 在目录/etc ...
                            
                            
                                分类:
系统相关   时间:
2019-05-24 19:10:00   
                                阅读次数:
136
                             
                         
                    
                        
                            
                            
                                    cad闪退 用Everything搜索 删除 flexnet 目录下所有文件,这是由于注册文件导致的... CAD如果保存慢: 1:另存R14格式,再保存成07。 2:关闭之后再次打开,保存,速度变快。 (尝试清理词典,上面的很多线型?) (pua 等源泉清理) CAD不能粘贴,出现_pastecl ...
                            
                            
                                分类:
其他好文   时间:
2019-05-11 16:36:07   
                                阅读次数:
161