自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 简单数论初步及一些筛法

扩同余方程展欧几里得算法&一阶线性 对于一阶线性同余方程ax≡c(modb)ax\equiv c\pmod{b}ax≡c(modb)可以变形为不定方程ax+by=cax+by=cax+by=c,当gcd⁡(a,b)∣c\gcd(a,b)\mid cgcd(a,b)∣c时,该方程有解。 对于一般的一阶线性同余方程我们是无法直接求解的,但可以通过拓展欧几里得算法求出通解。 设d=gcd⁡(a,b)d=\gcd(a,b)d=gcd(a,b),则可以通过欧几里得先算出ax+by=dax+by=dax+by=

2021-03-25 17:35:27 187 1

原创 “蔚来杯“2022牛客暑期多校训练营6 个人题解

2022牛客暑期多校训练营6 个人题解

2022-08-06 19:05:33 318 1

原创 积性函数&反演

积性函数指对于所有互质的整数 aaa 和 bbb 有性质 f(ab)=f(a)f(b)f (ab)=f(a)f(b)f(ab)=f(a)f(b) 的数论函数。 完全积性函数则将条件弱化为对任意整数 a,ba, ba,b​ 均满足上述条件。 积性函数的相关运算律 交换律 : f∗g=g∗ff * g = g * ff∗g=g∗f 结合律 : (f∗g)∗h=f∗(g∗h)(f * g) * h = f * (g * h)(f∗g)∗h=f∗(g∗h) 分配律 : f∗(g+h)=f∗g+f∗hf * (g +

2021-08-24 22:19:30 168

原创 快速傅里叶变换模板

fft板子 #include<iostream> #include<cstdio> #include<cmath> #define endl "\n" #define gc getchar() #define rep(a,b,c) for (int i = a; i <= b; i += c) using namespace std; const int N = 1e7 + 10; const double pi = acos(-1.0); inline in

2021-08-24 21:56:36 126

原创 数据结构实验二 :Joseph环

#include <iostream> using namespace std; typedef struct lnode { int data; struct lnode* nxt; }lnode, * linklist; linklist l, k; void creat(linklist& l) { l = new lnode; l->nxt = NULL; } void init(linklist& l, int n) { linklist r =

2021-05-12 13:29:04 163

原创 面向对象第二 \ 三次实验

#include <iostream> using namespace std; typedef struct lnode { int data; struct lnode* nxt; }lnode, * linklist; class list { public: list(); ~list(); list(const list& li); void init(int n); bool insert(int index, int elem); bool Delete

2021-05-12 11:57:14 67

原创 顺序表

#include <bits/stdc++.h> #include <Windows.h> using namespace std; const int maxsize = 1e4 + 10; //建立学生信息的结构体 struct Student { string name; int ID; int score; }s; //重载结构体的是否等于判断 bool operator==(Student a, Student b) { if (a.ID == b.ID &a

2021-04-23 21:33:11 71

原创 生成字符串(卡特兰数应用)

生成字符串 Description lxhgww 需要把 nnn 个1 和 mmm 个0组成字符串,同时保证在任意的前 kkk 个字符中,1的个数不能少于0的个数。现在 lxhgww 想要知道满足要求的字符串共有多少个。 Solution 根据题意,字符串的长度为 n+mn+mn+m,如果将问题退化成只求要求有 nnn 个1的方案,答案很明显就是 Cn+mn\mathrm{C}_{n+m}^nCn+mn​,但如果要保证在任意的前k个字符中,1的个数不能少于0的个数,就需要把不符合条件的去掉。 我们可以假设在

2021-03-11 16:49:56 133

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除