摘要: "题目链接" 题目描述: 给定一个矩阵,定义$f(A)$ 为矩阵中不同元素的个数。现在要求$f(A)$的期望。 解法: 首先来暴力的,复杂度大约:$O(n^{4})$。枚举原矩阵中每一个数字的贡献数, cpp LL submatix(int x,int y) { LL res=1ll x (x+1) 阅读全文
posted @ 2017-08-02 18:17 Code-dream 阅读(126) 评论(0) 推荐(0) 编辑
摘要: $f(l,r,k)=$区间[$l$,$r$]的第k大。 $\sum_{l=1}^{n}{\sum_{r=l}^{n}{f(l,r,k)}}$ 参考题解,claris大佬题解。赛后AC。。。 "题目链接" cpp include include include include include incl 阅读全文
posted @ 2017-08-02 11:56 Code-dream 阅读(171) 评论(0) 推荐(0) 编辑