1. 首页
  2. 公告
  1. 登录
  2. Language
    1. English
    2. 한국어
    3. 简体中文
    4. 正體中文

2024tysc0454

UID: 12721, 注册于 2024-6-14 13:19:38, 最后登录于 2025-9-25 12:44:44, 最后活动于 2025-9-25 13:35:46.

解决了 667 道题目,RP: 263.47 (No. 63)

♂
  • 个人简介

    </p>


    悬赏令

    全 oiClass\texttt{oiClass}oiClass 悬赏这位神犇!找到可获得空气 pVct78O.md.jpg


    $\texttt{Update 2025-7-16 }$2.1 万字!

    Update 2025-8-9 \texttt{Update 2025-8-9 }Update 2025-8-9 删掉了一些东西,于是只有 2 万字了。

    :ZBXawa


    • 剪切板
    $\texttt{Math}$

    来自Luogu神犇的数学学习笔记——https://www.luogu.com.cn/article/ubd4ucn3

    ∫0akxp dx=kp+1ap+1\int_0^akx^p\ dx=\frac{k}{p+1}a^{p+1} ∫0a​kxp dx=p+1k​ap+1 F(x)=f′(x)∫abf(x) dx=F(a)−F(b)F(x)=f'(x)\\ \int_a^bf(x)\ dx=F(a)-F(b) F(x)=f′(x)∫ab​f(x) dx=F(a)−F(b)
    $\texttt{Tools}$

    My tools\texttt{My tools}My tools

    小熊猫 IDE 密码 f0tp\text{f0tp}f0tp

    $\texttt{Bookshelf}$

    整型溢出:信息学竞赛的发展,繁荣与衰退_修订版

    Ryu:Fast Float-to-String Conversion

    How to Read Floating Point Numbers Accurately

    Jacobis Four Squares Theorem

    C++ 基础知识指南 by Luogu uid 745184

    $\LaTeX$ 原码
    显示效果 源码
    ∑i=1n\sum_{i=1}^{n}∑i=1n​ \sum_{i=1}^{n}
    ∏i=1n\prod_{i=1}^{n}∏i=1n​ \prod_{i-1}^{n}
    ∫01\int_{0}^{1}∫01​ \int_{0}^{1}
    a×ba\times ba×b a\times b
    114514mod  114514114514\mod{114514}114514mod114514 114514\mod{114514}
    114514\boxed{114514}114514​ \boxed{114514}
    ±∓\pm\mp±∓ \pm\mp
    ÷\div÷ \div
    {x=1x>0x=−1x≤0\begin{cases}x=1&x>0\\x=-1&x\le0\end{cases} {x=1x=−1​x>0x≤0​

    \begin{cases}x=1&x>0\\x=-1&x\le0\end{cases}

    (洛谷) LaTeX\LaTeXLATE​X 公式大全 https://www.luogu.com.cn/article/1gxob6zc

    $\texttt{Connect to Websites}$
    工具 链接
    LaTeX\LaTeXLATE​X 编辑器 https://www.latexlive.com/
    图论编辑器 https://csacademy.com/app/graph_editor/
    ASCII 艺术字 https://www.perfcode.com/tools/generator/ascii-art
    蓝奏云 https://www.lanzou.com/
    OI Wiki https://www.oi-wiki.org/
    TED演讲 https://www.ted.com/
    Desmos https://www.desmos.com/?lang=zh-CN
    剪切板 https://paste.ubuntu.com/
    尺规作图 https://www.euclidea.xyz/en/game/packs
    答案:https://mathsfans.github.io/Euclidea/v1/
    acm https://www.acm.org/
    插件 https://chrome.zzzmh.cn/extension
    文言文加密 https://abra.js.org/
    APK 文件 通过 GitHub\texttt{GitHub}GitHub 下载
    教材 https://jc.pep.com.cn/
    文本比对 https://csacademy.com/app/diffing_tool/
    原题机 http://yuantiji.ac/zh/
    题目提示器(支持洛谷蓝题及以上) https://unigravityqwq.github.io/
    $\texttt{Welcome to Phigros!}$

    Phigros rks 15.00!!!\texttt{Phigros rks 15.00!!!}Phigros rks 15.00!!!

    pV6qpUs.jpg

    开歌名

    Phira 密码:73ac

    something nice come from Luogu

    v/s 攻略

    $\texttt{Play for FUN}$

    Touch/Click to play!

    你已进入雷区!请时刻留意身后!

    Game
    进化
    ruarua.ru
    kiomet.com
    $\texttt{Code}$

    更新说明

    2025/8/22

    确认了树状数组模板的正确性,更新了线段树(模板正在封装中,已 AC 洛谷 P3372 【模板】线段树 1)。

    2025/8/13

    更新了快读快写。

    2025/8/9

    更新了手写的高精度加减法、高精度乘法。


    FastOI 模板

    #include<bits/stdc++.h>
    #define ll long long
    //#define getchar getchar_unlocked
    namespace fastIO{
    #define ll long long
    	void readInt(int& n){
    		n=0;bool neg=false;char c=getchar();
    		while(!isdigit(c))neg|=(c=='-'),c=getchar();
    		while(isdigit(c))n=(n<<1)+(n<<3)+c-48,c=getchar();
    		if(neg)n=-n;
    	}
    	void readLL(ll& n){
    		n=0;bool neg=false;char c=getchar();
    		while(!isdigit(c))neg|=(c=='-'),c=getchar();
    		while(isdigit(c))n=(n<<1)+(n<<3)+c-48,c=getchar();
    		if(neg)n=-n;
    	}
    	void writeInt(int n){
    		if(n==0){putchar('0');return;}
    		if(n<0){putchar('-'),n=-n;}
    		int s[25];int*p=s;
    		while(n!=0)*(++p)=n%10,n/=10;
    		while(p!=s)putchar(*(p--)+48);
    	}
    };
    using namespace std;
    using namespace fastIO;
    
    int main(){
    	
    	return 0;
    }
    

    Bellman-Ford 最短路算法

    可以通过 Luogu P3371 【模板】单源最短路径(弱化版)

    #include<bits/stdc++.h>
    #define ll long long
    using namespace std;
    constexpr int N=1e4+5,INF=0x3f3f3f3f;
    struct edge{int t,w;};
    int n,m,u,v,w,dis[N],st;
    vector<edge>g[N];
    void bellmanford(int u){
    	memset(dis,127,sizeof(dis));
    	dis[u]=0;
    	bool isrelex=true;
    	while(isrelex){
    		isrelex=false;
    		for(int s=1;s<=n;s++){
    			for(size_t i=0;i<g[s].size();i++){
    				int t=g[s][i].t,w=g[s][i].w;
    				if(dis[t]>dis[s]+w){
    					dis[t]=dis[s]+w;
    					isrelex=true;
    				}
    			}
    		}
    	}
    }
    int main(){
    	scanf("%d%d%d",&n,&m,&st);
    	while(m--){
    		scanf("%d%d%d",&u,&v,&w);
    		g[u].push_back({v,w});
    	}
    	bellmanford(st);
    	for(int i=1;i<=n;i++){
    		if(dis[i]==dis[0])printf("%d ",(1ll<<31)-1);
    		else printf("%d ",dis[i]);
    	}
    	return 0;
    }
    

    SPFA(Bellman-Ford 队列优化)

    关于 SPFA,它死了。

    请谨慎使用 SPFA!最坏时间复杂度仍为 O(VE)\mathcal{O}(VE)O(VE) 且易卡!

    可以通过 Luogu P3371 【模板】单源最短路径(弱化版)

    #include<bits/stdc++.h>
    #define ll long long
    using namespace std;
    constexpr int N=1e4+5,INF=0x3f3f3f3f;
    struct edge{int t,w;};
    int n,m,u,v,w,dis[N],st;
    vector<edge>g[N];
    bool vis[N];
    queue<int>que;
    void spfa(int u){
    	memset(dis,127,sizeof(dis));
    	dis[u]=0,vis[u]=true;
    	que.push(u);
    	while(!que.empty()){
    		int s=que.front();
    		que.pop();
    		vis[s]=false;
    		for(edge e:g[s]){
    			if(dis[e.t]>dis[s]+e.w){
    				dis[e.t]=dis[s]+e.w;
    				if(!vis[e.t]){
    					que.push(e.t);
    					vis[e.t]=true;
    				}
    			}
    		}
    	}
    }
    int main(){
    	scanf("%d%d%d",&n,&m,&st);
    	while(m--){
    		scanf("%d%d%d",&u,&v,&w);
    		g[u].push_back({v,w});
    	}
    	spfa(st);
    	for(int i=1;i<=n;i++){
    		if(dis[i]==dis[0])printf("%d ",(1ll<<31)-1);
    		else printf("%d ",dis[i]);
    	}
    	return 0;
    }
    

    快速幂

    #include<cstdio>
    #define ll long long
    using namespace std;
    ll fastPow(ll b,ll p,ll mod){
    	//b%=mod [{mod} is a Prime]
    	ll res=1;
    	while(p>0){
    		if(p&1)res=res*b%mod;
    		b=b*b%mod,p>>=1;
    	}
    	return res;
    }
    
    

    树状数组

    单点更改,范围查询

    template<typename T,const int SIZE>
    class treeArray{
    private:
    	T tree[SIZE];
    	int lowbit(int x){return x&-x;}
    	T query(int p){T sum=0;while(p>0){sum+=tree[p];p-=lowbit(p);}return sum;}
    public:
    	void update(int p,T val){while(p<=SIZE){tree[p]+=val;p+=lowbit(p);}}
    	T range(int lb,int ub){return query(ub)-query(lb-1);}
    };
    

    多点更改,多点查询

    template<typename T,const int SIZE>
    class treeArray{
    private:
    	T tree1[SIZE],tree2[SIZE];
    	int lowbit(int x){return x&-x;}
    	void upd1(int p,T val){while(p<=SIZE){tree1[p]+=val;p+=lowbit(p);}}
    	void upd2(int p,T val){while(p<=SIZE){tree2[p]+=val;p+=lowbit(p);}}
    	int qry1(int p){T sum=0;while(p>0){sum+=tree1[p];p-=lowbit(p);}return sum;}
    	int qry2(int p){T sum=0;while(p>0){sum+=tree2[p];p-=lowbit(p);}return sum;}
    public:
    	void updata(int l,int r,T val){
    		upd1(l,val);upd1(r+1,-val);
    		upd2(l,(l-1)*val);upd2(r+1,-(r*val));
    	}
    	T range(int l,int r){
    		return qry1(r)*r-qry2(r)-qry1(l-1)*(l-1)+qry2(l-1);
    	}
    };
    

    线段树(施工ing...)

    #include<bits/stdc++.h>
    using namespace std;
    template<typename T,int SIZE>
    class segmentTree{
    private:
    	T tree[SIZE*4],tag[SIZE*4];
    	int n=0;
    	T calc(const T& x,const T& y){
    		return x+y;
    		//TODO
    	}
    	void tag_add(int lb,int ub,int p,const T val){
    		tree[p]+=(ub-lb+1)*val;
    		tag[p]+=val;
    	}
    	void tag_pushdown(const int&lb,const int&ub,const int&p){
    		if(!tag[p])return;
    		int mid=(lb+ub)>>1;
    		tag_add(lb,mid,p<<1,tag[p]);
    		tag_add(mid+1,ub,p<<1|1,tag[p]);
    		tag[p]=0;
    	}
    	void _built(const int lb,const int ub,const int p,const T* it){
    		if(lb==ub){tree[p]=*(it+p);return;}
    		int mid=(lb+ub)>>1;
    		_built(lb,mid,p<<1,it);
    		_built(mid+1,ub,p<<1|1,it);
    		tree[p]=tree[p<<1]+tree[p<<1|1];
    	}
    	T _query(int lb,int ub,int p,const int l,const int r){
    		if(l<=lb&&ub<=r)return tree[p];
    		T sum=0;
    		int mid=(lb+ub)>>1;
    		tag_pushdown(lb,ub,p);
    		if(l<=mid)sum=calc(_query(lb,mid,p<<1,l,r),sum);
    		if(r>mid)sum=calc(_query(mid+1,ub,p<<1|1,l,r),sum);
    		return sum;
    	}
    	void _update(int lb,int ub,int p,const T val,const int l,const int r){
    		if(l<=lb&&ub<=r){
    			tag_add(lb,ub,p,val);
    			return;
    		}
    		int mid=(lb+ub)>>1;
    		tag_pushdown(lb,ub,p);
    		if(l<=mid)_update(lb,mid,p<<1,val,l,r);
    		if(mid<r)_update(mid+1,ub,p<<1|1,val,l,r);
    		tree[p]=tree[p<<1]+tree[p<<1|1];
    	}
    public:
    	void built(const int&l,const int&r,const T*it){
    		_built(l,r,1,it);
    		n=max(n,r);
    	}
    	void update(const int&l,const int&r,const T&val){
    		_update(1,n,1,val,l,r);
    	}
    	T query(const int&l,const int&r){
    		return _query(1,n,1,l,r);
    	}
    };
    constexpr int N=1e5+5;
    int n,q;
    long long a[N];
    segmentTree<long long,N> smt;
    int main(){
    	scanf("%d%d",&n,&q);
    	for(int i=1;i<=n;i++)scanf("%lld",a+i);
    	smt.built(1,n,a);
    	while(q--){
    		int opt,x,y;
    		long long val;
    		scanf("%d%d%d",&opt,&x,&y);
    		if(opt==1){
    			scanf("%lld",&val);
    			smt.update(x,y,val);
    		}else{
    			long long ans=smt.query(x,y);
    			printf("%lld\n",ans);
    		}
    	}
    	return 0;
    }
    

    优先队列(小根/大根堆)

    template<typename T,unsigned int siz,bool(*cmp)(T x,T y)>
    class pri_queue{
    private:
    	int len=0;
    	T heap[siz];
    	void swap(T &a,T &b){T tmp=a;a=b;b=tmp;}
    	void push_up(int x){
    		while(x>1&&cmp(heap[x>>1],heap[x])){
    			swap(heap[x>>1],heap[x]);
    			x>>=1;
    		}
    	}
    	void push_down(int x){
    		int p=1,l,r;
    		while(true){
    			l=x<<1,r=(x<<1)+1;
    			if(l<=len&&cmp(heap[x],heap[l]))p=l;
    			if(r<=len&&cmp(heap[p],heap[r]))p=r;
    			if(x==p)return;
    			else{
    				swap(heap[x],heap[p]);
    				x=p;
    			}
    		}
    	}
    public:
    	T* begin(){return heap+1;}
    	T* end(){return heap+len+1;}
    	int size(){return len;}
    	bool empty(){return len==0;}
    	T top(){return heap[1];}
    	void push(T val){
    		heap[++len]=val;
    		push_up(len);
    	}
    	void pop(){
    		heap[1]=heap[len--];
    		push_down(1);
    	}
    };
    bool cmp(int a,int b){return a<b;}//小根堆
    
    

    高精度计算

    手写

    这个 78 玩意浪费了我三天时间……

    #include<bits/stdc++.h>
    using namespace std;
    using ll=long long;
    constexpr int N=20050;
    struct Bignum{
    	int len=0,a[N];
    	
    	int& operator[](size_t p){return a[p];}
    	const int& operator[](size_t p)const{return a[p];}
    	bool isdight(char ch){return '0'<=ch&&ch<='9';}
    	void reverse(){for(int i=1;i<=len/2;i++)swap(a[i],a[len-i+1]);}
    	void fread(){
    		len=0;
    		char ch=getchar();
    		while(ch=='0')ch=getchar();
    		while(isdight(ch))a[++len]=ch-'0',ch=getchar();
    		reverse();
    	}
    	void read(){
    		len=0;
    		string str;
    		cin>>str;
    		for(int i=str.size()-1;i>=0;i--)a[++len]=str[i]-'0';
    		while(a[len]==0)len--;
    	}
    	void print(){if(len==0)putchar('0');for(int i=len;i>0;i--)putchar(a[i]+'0');}
    	void println(){print();putchar('\n');}
    	
    	void clear(){for(int i=1;i<=len;i++)a[i]=0;len=0;}
    	
    	void copynum(ll x){
    		len=0;
    		while(x>0)a[++len]=x%10,x/=10;
    	}
    	void copy(Bignum x){
    		for(int i=1;i<=x.len;i++)a[i]=x[i];
    		len=x.len;
    	}
    	
    	bool operator==(const Bignum& b)const{
    		if(len!=b.len)return false;
    		for(int i=len;i>=0;i--){
    			if(a[i]!=b[i])return false;
    		}
    		return true;
    	}
    	bool operator==(const ll& b)const{
    		Bignum c;c.copynum(b);
    		return *this==c;
    	}
    	bool operator!=(const Bignum& b)const{
    		return !(*this==b);
    	}
    	bool operator!=(const ll& b)const{
    		return !(*this==b);
    	}
    	bool operator<(const Bignum& b)const{
    		if(len<b.len)return true;
    		if(len>b.len)return false;
    		for(int i=len;i>=1;i--){
    			if(a[i]<b[i])return true;
    			if(a[i]>b[i])return false;
    		}
    		return false;
    	}
    	bool operator<(const ll& b)const{
    		Bignum c;c.copynum(b);
    		return *this<c;
    	}
    	bool operator>(const Bignum& b)const{
    		if(len>b.len)return true;
    		if(len<b.len)return false;
    		for(int i=len;i>=1;i--){
    			if(a[i]>b[i])return true;
    			if(a[i]<b[i])return false;
    		}
    		return false;
    	}
    	bool operator>(const ll& b)const{
    		Bignum c;c.copynum(b);
    		return *this>c;
    	}
    	bool operator<=(const Bignum& b)const{return !(*this>b);}
    	bool operator<=(const ll& b)const{return !(*this>b);}
    	bool operator>=(const Bignum& b)const{return !(*this<b);}
    	bool operator>=(const ll& b)const{return !(*this<b);}
    	
    	Bignum operator+(const Bignum& b)const{
    		Bignum c;
    		int add=0;
    		for(int i=1;i<=max(len,b.len);i++){
    			c[i]=(a[i]+b[i]+add)%10;
    			if(add+a[i]+b[i]>9)add=1;
    			else add=0;
    		}
    		c.len=max(len,b.len);
    		if(add==1)c[++c.len]=1;
    		return c;
    	}
    	void operator+=(const Bignum& b){*this=*this+b;}
    	Bignum operator-(const Bignum& b)const{
    		Bignum c;
    		for(int i=1;i<=max(len,b.len)+1;i++)c[i]=0;
    		for(int i=1;i<=max(len,b.len)+1;i++){
    			c[i]+=a[i]-b[i];
    			if(c[i]<0)c[i+1]--,c[i]+=10;
    		}
    		c.len=max(len,b.len);
    		while(!c[c.len]&&c.len>1)c.len--;
    		return c;
    	}
    	void operator-=(const Bignum& b){*this=*this-b;}
    	Bignum operator*(const Bignum& b)const{
    		if(*this==0)return *this;
    		if(b==0)return b;
    		Bignum c,t;
    		for(int i=1;i<=len+b.len;i++)c[i]=0;
    		for(int i=1;i<=len;i++){
    			int add=0;
    			t[i-1]=0;
    			for(int j=1;j<=b.len;j++){
    				int k=a[i]*b[j]+add;
    				t[i+j-1]=k%10;
    				add=k/10;
    			}
    			t.len=i+b.len-1;
    			if(add>0)t[++t.len]=add;
    			c=c+t;
    		}
    		return c;
    	}
    	void operator*=(const Bignum& b){*this=(*this)*b;}
    };
    void write(Bignum x){if(x.len==0)putchar('0');for(int i=x.len;i>=1;i--)putchar(x[i]+'0');}
    void writeln(Bignum x){write(x);putchar('\n');}
    Bignum n,m,k;
    int main(){
    	n.read();
    	m.read();
    	if(n<m)swap(n,m);
    	write(n-m);
    	return 0;
    }
    /*
    69 473
    = 32637
    */
    

    高精度

    #include<iostream>
    #include<vector>
    #include<cstring>
    #include<cassert>
    #define ll long long
    using namespace std;
    struct BigInteger{
    	static const ll BASE=100000000;
    	static const ll WIDTH=8;
    	vector<ll>s;
    	BigInteger&clean(){while(!s.back()&&s.size()>1)s.pop_back();return*this;}
    	BigInteger(ll num=0){*this=num;}
    	BigInteger(string s){*this=s;}
    	BigInteger&operator=(ll num){s.clear();do{s.push_back(num%BASE);num/=BASE;}while(num>0);return*this;}
    	BigInteger&operator=(const string&str){s.clear();ll x,len=(str.length()-1)/WIDTH+1;for(ll i=0;i<len;i++){ll end=str.length()-i*WIDTH;ll start=max(0ll,end-WIDTH);sscanf(str.substr(start,end-start).c_str(),"%lld",&x);s.push_back(x);}return(*this).clean();}
    	BigInteger operator+(const BigInteger&b)const{BigInteger c;c.s.clear();for(size_t i=0,g=0;;i++){if(g==0&&i>=s.size()&&i>=b.s.size())break;ll x=g;if(i<s.size())x+=s[i];if(i<b.s.size())x+=b.s[i];c.s.push_back(x%BASE);g=x/BASE;}return c;}
    	BigInteger operator-(const BigInteger&b)const{assert(b<=*this);BigInteger c;c.s.clear();for(size_t i=0,g=0;;i++){if(g==0&&i>=s.size()&&i>=b.s.size())break;ll x=s[i]+g;if(i<b.s.size())x-=b.s[i];if(x<0)g=-1,x+=BASE;else g=0;c.s.push_back(x);}return c.clean();}
    	BigInteger operator*(const BigInteger&b)const{ll g;vector<ll>v(s.size()+b.s.size(),0);BigInteger c;c.s.clear();for(size_t i=0;i<s.size();i++)for(ll j=0;j<b.s.size();j++)v[i+j]+=(ll)(s[i])*b.s[j];for(ll i=0,g=0;;i++){if(g==0&&i>=v.size())break;ll x=v[i]+g;c.s.push_back(x%BASE);g=x/BASE;}return c.clean();}
    	BigInteger operator/(const BigInteger&b)const{assert(b>0);BigInteger c=*this;BigInteger m;for(ll i=s.size()-1;i>=0;i--){m=m*BASE+s[i];c.s[i]=bsearch(b,m);m-=b*c.s[i];}return c.clean();}
    	BigInteger operator%(const BigInteger&b)const{BigInteger c=*this;BigInteger m;for(ll i=s.size()-1;i>=0;i--){m=m*BASE+s[i];c.s[i]=bsearch(b, m);m-=b*c.s[i];}return m;}
    	ll bsearch(const BigInteger&b,const BigInteger&m)const{ll L=0,R=BASE-1,x;while(true){x=(L+R)>>1;if(b*x<=m){if(b*(x+1)>m)return x;else L=x;}else R=x;}}
    	BigInteger&operator+=(const BigInteger&b){*this=*this+b;return*this;}
    	BigInteger&operator-=(const BigInteger&b){*this=*this-b;return*this;}
    	BigInteger&operator*=(const BigInteger&b){*this=*this*b;return*this;}
    	BigInteger&operator/=(const BigInteger&b){*this=*this/b;return*this;}
    	BigInteger&operator%=(const BigInteger&b){*this=*this%b;return*this;}
    	bool operator<(const BigInteger&b)const{if(s.size()!=b.s.size()){return s.size()<b.s.size();}for(ll i=s.size()-1;i>=0;i--)if(s[i]!=b.s[i])return s[i]<b.s[i];return false;}
    	bool operator>(const BigInteger&b)const{return b<*this;}
    	bool operator<=(const BigInteger&b)const{return!(b<*this);}
    	bool operator>=(const BigInteger&b)const{return!(*this<b);}
    	bool operator!=(const BigInteger&b)const{return b<*this||*this<b;}
    	bool operator==(const BigInteger&b)const{return!(b<*this)&&!(b>*this);}
    };
    ostream&operator<<(ostream&out,const BigInteger&x){out<<x.s.back();for(ll i=x.s.size()-2;i>=0;i--){char buf[20];sprintf(buf,"%08lld",x.s[i]);for(size_t j=0;j<strlen(buf);j++){out<<buf[j];}}return out;}
    istream&operator>>(istream&in,BigInteger&x){string s;if(!(in>>s))return in;x=s;return in;}
    BigInteger binpow(BigInteger b,BigInteger p,BigInteger m){
    	//b%=m {m is a prime.}
    	BigInteger ans=1;
    	while(p>0){
    		if(p%2==1)ans=ans*b%m;
    		b=b*b%m;
    		p/=2;
    	}
    	return ans;
    }
    BigInteger Math_C(BigInteger n,BigInteger k){
    	if(k==0||k==n)return 1;
    	BigInteger ans=1;
    	for(BigInteger i=k+1;i<=n;i+=1)ans*=i;
    	for(BigInteger i=2;i<=n-k;i+=1)ans/=i;
    	return ans;
    }
    BigInteger Math_P(BigInteger n,BigInteger k){
    	BigInteger ans=1;
    	for(BigInteger i=n-k+1;i<=n;i+=1)ans*=i;
    	return ans;
    }
    

    FFT优化

    原版

    压行

    对拍

    #include<cstdio>
    #include<cstdlib>
    int main(){
    	while(true){
    		system("gen > test.in");
    		system("test1.exe < test.in > a.out");
    		system("test2.exe < test.in > b.out");
    		if(system("fc a.out b.out")){
    			system("pause");
    			return 0;
    		}
    	}
    }
    
    $\textbf{杂项}$

    神犇的 Blog


    有色图


    终于被发现了吗?


    @

    pVabl5Q.png

  • 最近活动

    • 2025 CSP-J1初赛模拟测试10 OI
    • 2025 CSP-J1初赛模拟测试9 OI
    • 2025 CSP-J1初赛模拟测试8 OI
    • 2025 CSP-J1初赛模拟测试7 OI
    • 2025 CSP-J1初赛模拟测试6 OI
    • 2025 CSP-J1初赛模拟测试5 OI
    • 2025 CSP-J1初赛模拟测试4 OI
    • 2025 CSP-J1初赛模拟测试3 OI
    • 2025TYOI暑期集训结营娱乐赛 ACM/ICPC
    • 第四届 TYCPC 程序设计大赛(重现补题赛) IOI
    • D班-第六周周末练习题 作业
    • D班——倍增算法 作业
    • D班——动规加强(区间环形DP/多维DP/差值DP) 作业
    • D班-第三周周末练习题 作业
    • D班——区间DP之区间合并 作业
    • D班——区间DP之区间分割 作业
    • D班——搜索算法作业题 作业
    • 【oiClass公益赛】2025CSP-J模拟赛#17 OI
    • 2024预备班复活赛 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#16 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#15 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#14 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#13 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#12 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#11 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#10 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#09 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#08 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#07 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#06 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#05 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#04 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#03 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#02 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#01 OI
    • 结营测试改题 IOI
    • D班——背包动态规划2 作业
    • D班——背包动态规划1 作业
    • D班——二维动规之最长公共子序列 作业
    • D班——二维线性动态规划规 作业
    • D班——线性动规之子序列问题 作业
    • D班——线性动态规划基础 作业
    • D班——二分搜索 作业
    • D班——二分算法 作业
    • D班——队列 作业
    • D班——广度优先搜索 作业
    • 2024小六冬令营《队列》 作业
    • 铁外信息学作业-CD班(25年1月-循环结构、数组) 作业
    • 2024预备——期末测试改题 IOI
    • 2024预备--深度优先搜索算法2 作业
    • 2024预备--深度优先搜索算法 作业
    • 2024预备--递归算法加强 作业
    • 2024预备--递归算法入门 作业
    • 2024预备班--阶段测试5 OI
    • 2024预备--第13周周中练习 作业
    • 2024预备班11月阶段测试(订正) IOI
    • 2024预备--栈 作业
    • 2024预备--差分前缀和 作业
    • 2024预备--贪心算法 作业
    • 2024预备--枚举算法 作业
    • 2024预备--模拟算法 作业
    • 2024预备--第八周加练题单 作业
    • 2024预备--指针&结构体&排序 作业
    • 2024预备班10月阶段测试 OI
    • 2024预备--位运算 作业
    • 2024预备--进制转换 作业
    • 2024预备--函数 作业
    • 2024预备--第四周周中习题 作业
    • 2024预备班阶段测试1 OI
    • D班——差值DP/双指针 作业
    • 2024预备--字符、字符串加强练习 作业
    • 2024预备--习题订正 作业
    • 2024预备--二维数组基础 作业
    • 2024oiClass入门组周赛计划#18 IOI
    • 2024oiClass入门组周赛计划#17 IOI
    • 2024oiClass入门组周赛计划#16 IOI
    • 2024oiClass入门组周赛计划#15 IOI
    • 2024oiClass入门组周赛计划#14 IOI
    • 2024oiClass入门组周赛计划#13 IOI
    • 2024oiClass入门组周赛计划#12 IOI
    • 2024oiClass入门组周赛计划#11 IOI
    • 2024oiClass入门组周赛计划#10 IOI
    • 2024oiClass入门组周赛计划#09 IOI
    • 2024新苗-递推算法基础 作业
    • 2024新苗--排序算法基础 作业
    • 2024新苗--字符、字符数组、字符串 作业
    • 2024新苗--数组标记的应用 作业
    • 2024新苗--一维数组基础 作业
    • 2024新苗--多重循环 作业
    • 2024新苗班阶段测试2 OI
    • 2024新苗--while2 作业
    • 2024新苗--循环语句(while语句1) 作业
    • 2024新苗--数据的在线处理 作业
    • 2024新苗班阶段测试一(下午班) OI
    • 2024新苗--枚举和筛选 作业
    • 2024新苗--循环语句(for语句1) 作业
    • 2024新苗--选择结构 作业
    • 2024新苗--表达式 作业
    • 2024新苗--C++程序结构 作业
  • Stat

  • Rating

816
已递交
667
已通过
0
题解被赞

状态

  • 评测队列
  • 服务状态

开发

  • 开源

支持

  • 帮助
  • 联系我们

关于

  • 关于
  • 隐私
  • 服务条款
  • 版权申诉
  1. Language
    1. English
    2. 한국어
    3. 简体中文
    4. 正體中文
  2. 兼容模式
  3. 主题
    1. 亮色
    2. 暗色
  1. 粤ICP备2024335011号
  2. Worker 0, 48ms
  3. Powered by Hydro v5.0.0-beta.8 Community
关闭

登录

使用您的 oiClass 通用账户

忘记密码或者用户名?