康托展开
二元数 不定积分
https://www.zhihu.com/question/285314606/answer/1515562342
https://www.luogu.com.cn/article/aiz4gi5f
https://www.luogu.com.cn/article/aiz4gi5f
《具体数学》
正则定理
https://learn.microsoft.com/zh-cn/cpp/cpp/friend-cpp?view=msvc-170
一位来自杭十四凤起的小挫人
OI WiKi
Miller-Rabin
莫队指针
https://www.luogu.com.cn/discuss/755848
password:hssz114514
手艹大根堆与小根堆
struct SH{
int tot,w[Max];
int top(){
return w[1];
}
void modify(int pos){
if(pos==1 || w[pos/2]<=w[pos])return;
swap(w[pos/2],w[pos]);
modify(pos/2);
}
void push(int x){
w[++tot]=x;
modify(tot);
}
void repair(int pos){
if(pos*2>tot)return;
int tar=pos*2;
if(pos*2+1<=tot)tar= w[pos*2]<w[pos*2+1] ? pos*2 : pos*2+1;
if(w[pos]>w[tar]){
swap(w[pos],w[tar]);
repair(tar);
}
}
void pop(){
swap(w[1],w[tot--]);
repair(1);
}
int size(){
return tot;
}
};
struct BH{
int tot,w[Max];
int top(){
return w[1];
}
void modify(int pos){
if(pos==1 || w[pos/2]>=w[pos])return;
swap(w[pos/2],w[pos]);
modify(pos/2);
}
void push(int x){
w[++tot]=x;
modify(tot);
}
void repair(int pos){
if(pos*2>tot)return;
int tar=pos*2;
if(pos*2+1<=tot)tar= w[pos*2]>w[pos*2+1] ? pos*2 : pos*2+1;
if(w[pos]<w[tar]){
swap(w[pos],w[tar]);
repair(tar);
}
}
void pop(){
swap(w[1],w[tot--]);
repair(1);
}
int size(){
return tot;
}
};
BH q;
SH p;构思线段树:
struct Segment_Tree{
LL w[Max*4],a[Max],lt[Max*4];
void add(int u){
w[u]=w[2*u]+w[2*u+1];
}
bool InRange(int l,int r,int L,int R){
return (l>=L)&&(r<=R);
}//judge [l,r] in [L,R].
bool OutOfRange(int l,int r,int L,int R){
return (r<L)||(l>R);
}//same as above.
void build(int u,int l,int r){
if(l==r){
w[u]=a[l];
return;
}
int mid=(l+r)<<1;
build(u*2,l,mid),build(u*2+1,mid+1,r);
add(u);
}
//[L,R] is the requested.
LL query1(int u,int l,int r,int q){
if(l==r){
return w[l];
}else{
int mid=(l+r)>>1;
if(mid>=q){
return query1(u*2,l,mid,q);
}else{
return query1(u*2+1,mid+1,r,q);
}
}
}
void update1(int u,int l,int r,int p,LL x){
if(l==r){
w[u]=x;
}else{
int mid=(l+r)>>1;
if(mid>=p){
update1(u*2,l,mid,p,x);
}else{
update1(u*2,mid+1,r,p,x);
}
add(u);
}
}
void maketag(int u,int len,LL x){
lt[u]=x;
w[u]+=x*len;
}
void update(int u,int l,int r,int L,int R,LL x){
if(OutOfRange(l,r,L,R)){
return;
}else if(InRange(l,r,L,R)){
maketag(u,(r-l+1),x);
}else{
int mid=(l+r)>>1;
update(2*u,l,mid,L,R,x);
update(2*u+1,mid+1,r,L,R,x);
}
}
LL query(int u,int l,int r,int L,int R){
if(OutOfRange(l,r,L,R)){
return 0;
}else if(InRange(l,r,L,R)){
return w[u];
}else{
int mid=(l+r)>>1;
return query(u*2,l,mid,L,R)+query(u*2+1,mid+1,r,L,R);
}
}
};
Segment_Tree t;宁の朋友——Mr.快读
int read(){
char ch=getchar();
int x=0,f=1;
while(ch<'0'||ch>'9'){
if(ch=='-')f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9'){
x=x*10+(ch^48);
ch=getchar();
}
return x*f;
}
快输
void out(int x)
{
if(x<0)putchar('-'),x=-x;
if(x<10)putchar(x+'0');
else out(x/10),putchar(x%10+'0');
}NEXT——取消cin cout の同步
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);矩阵压缩 ×
2023.10.12——普及- 100+
2023.10.13——普及/提高− 10+
2023.10.16——再次绿名
2023.10.30 梦碎
2023.11.8 期中小寄+女生们眼中的小丑
2023.12.8 基础赛差点AK了
2023.12.10 第一道绿题
极域password: mythware_super_password
##强联通分量
##deque
未完成——P1045
#include<bits/stdc++.h>
#define MAX 2001
using namespace std;
int p,a[MAX],b[MAX],ans[MAX];
void sum_1(){
for(int i=1;i<=500;i++){
for(int j=1;j<=500;j++){
ans[i+j-1]=a[i]*b[j];
}
}
for(int i=1;i<=500;i++){
for(int j=1;j<=500;j++){
}
}
while(ans[]){
}
}
void sum_2(){
for(int i=1;i<=500;i++){
for(int j=1;j<=500;j++){
}
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin>>p;
cout<<(int)(p*log10(2)+1);
a[1]=1;
b[1]=2;
while(p){
if(p&1)sum_1();
p>>=1;
sum_2();
}
int i=500;
while(i>0){
if(i%50==0)cout<<endl;
i==1 ? cout<<ans[i]-1 : cout<<ans[i];
i--;
}
return 0;
}素数筛未完成
#include<bits/stdc++.h>
using namespace std;
int p[50000100],cnt=0;
bool P[100000010];
void Prime(int aim){
memset(P,true,sizeof(P));
P[1]=0;
for(int i=2;i<=aim;i++){
if(){
}
for()
}
}
int main(){
ios::sync_with_studio(false);
cin.tie(0);
cout.tie(0);
int n,q,a;
cin>>n>>q;
Prime(n);
for(int i=1;i<=q;i++){
cin>>a;
cout<<p[a];
}
return 0;
}强连通分量tarjan
zhelper
z-library
https://blog.csdn.net/weixin_42465242/article/details/120819275