![](https://img-blog.csdnimg.cn/20190927151124774.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
数学
文章平均质量分 64
多项式
aaalonggg
All over the place was six pence, but he looked up at the moon.
展开
-
Codeforces Round #179 (Div. 2) B.(容斥)
Codeforces Round #179 (Div. 2)B. Yaroslav and Two Strings题目翻译:(from洛谷)首先要注意到,所有的情况中,对于所有1<=i<=n,都有s[i] >= w[i]或s[i] <= w[i]那么这样的序列是不合法的。所以可以先把所有的组合情况算出来设为ans,并且算出1、2两种情况的序列数目分别为res1、 res2,最后减去以上两种情况的序列数目。答案就是ans - res1 - res2吗?并不是原创 2021-06-02 15:12:03 · 104 阅读 · 0 评论 -
Codeforces Round #698 (Div. 2) D. Nezzar and Board(数论,贝祖定理)
sl原创 2021-02-02 22:36:16 · 190 阅读 · 1 评论 -
Red-White Fence(计数问题,FFT/NTT)
分析#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 300010;const int mod = 998244353;const int G = 3;int a[N], b[N], Q[N], ans[N], fact[N], rfact[N];int p1[N << 2], p2[N << 2], rev[N << 2];i原创 2021-07-27 23:45:39 · 129 阅读 · 0 评论