摘要:
先挂个板子: #include <bits/stdc++.h> #define int long long using namespace std; const int N=1e6+10,mod=1e9+7; mt19937 sj(114514); struct node{ int l,r,key, 阅读全文
摘要:
扩展欧几里得: 最大公约数 - OI Wiki (oi-wiki.org) int exgcd(int a,int b,int &x,int &y){ if(!b){ x=1,y=0; return a; } int d=exgcd(b,a%b,y,x); int tmp=x; x=y; y=tmp 阅读全文