上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: 题目链接 记录一下,不详细写了,这道题的插头只需要二进制就够了。 Code #include <iostream> #include <algorithm> #include <cstring> #include <string> #include <cstdio> #include <vector 阅读全文
posted @ 2020-08-22 22:14 AE酱 阅读(98) 评论(0) 推荐(0)
摘要: 题目大意 给定全集 \(S,|S|=21\),然后给出 \(n(1\leq n\leq 10^6)\) 个 \(S\) 的子集 \(P_i\),以及每个子集的价值 \(V_i\),再给出 \(m(1\leq m\leq 10^6)\) 个询问,每次询问一个 \(S\) 的一个子集 \(T\),求所有 阅读全文
posted @ 2020-08-12 14:50 AE酱 阅读(246) 评论(0) 推荐(0)
摘要: 若 \(f(n)=\sum_{i=0}^n\binom{n}{i}g(i)\),则 \(g(n)=\sum_{i=0}^n(-1)^{n-i}\binom{n}{i}f(i)\) 。 证明: \[ g(n)=\sum_{i=0}^n(-1)^{n-i}\binom{n}{i}f(i)\\ =\sum 阅读全文
posted @ 2020-08-11 23:20 AE酱 阅读(145) 评论(0) 推荐(0)
摘要: 子集反演 莫比乌斯变换 \[ f(S)=\sum_{T\subseteq S} g(T) \] 莫比乌斯反演 \[ g(S)=\sum_{T\subseteq S}(-1)^{|S|-|T|} f(T) \] 证明: 由 \[ \sum_{i=0}^n(-1)^{i}\binom{n}{i}=[n= 阅读全文
posted @ 2020-08-11 23:18 AE酱 阅读(2062) 评论(0) 推荐(5)
摘要: 题目大意 给定正整数 \(n,x,k\),求 \[ \sum_{a_1=1}^{n}\sum_{a_2=1}^n\dotsb\sum_{a_x=1}^n\left(\prod_{j=1}^xa_j^k\right)f\left(gcd\left(a_1,a_2,\dots,a_x\right)\ri 阅读全文
posted @ 2020-08-10 11:26 AE酱 阅读(221) 评论(3) 推荐(0)
摘要: #include <iostream> #include <algorithm> #include <cstring> #include <string> #include <cstdio> #include <vector> using namespace std; #define RG regi 阅读全文
posted @ 2020-08-01 16:13 AE酱 阅读(148) 评论(0) 推荐(0)
摘要: fhq-Treap 是一种非旋转平衡二叉树,代码很好写。 #include <iostream> #include <algorithm> #include <cstring> #include <string> #include <cstdio> #include <vector> #includ 阅读全文
posted @ 2020-08-01 16:12 AE酱 阅读(144) 评论(0) 推荐(0)
摘要: 题目大意 给你一个 \(n(3\leq n\leq 50)\) 个点的完全图,每条边都有边权,且边权为 \([1,10^4]\) 范围内的随机数,要求删掉 \(k(1\leq k\leq \min(n-2,5))\) 条边,使得 $1\sim n$ 的最短路最长,输出删去 \(k\) 条边后最长的最 阅读全文
posted @ 2020-07-29 10:51 AE酱 阅读(308) 评论(0) 推荐(0)
摘要: 题目大意 给你一个序列 \(\{c_n\}\),以及一个正整数 \(M\),现在要将这个序列分割成连续的若干段,每一段的价值是 \(\left(\sum_{i=1}^{k}c_i\right)^2+M\),求最小价值。\((n\leq 500000,M\leq 1000)\) 题解 令 \(Sum[ 阅读全文
posted @ 2020-07-28 10:49 AE酱 阅读(86) 评论(0) 推荐(0)
摘要: 碰到HDU 2993这道傻逼题,调了一下午我还一直以为是自己写的有问题,结果竟然卡快读,迫不得已使用了fread... 比如这种数据 N M x1 x2 ... xn 应该这样读= = namespace fastIO { #define BUF_SIZE 100000 bool IOerror = 阅读全文
posted @ 2020-07-27 23:05 AE酱 阅读(203) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页