昆明站模板补充

__int128

typedef __int128 LL;
inline __int128 read(){__int128 x=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}return x*f;
}
inline void print(__int128 x){if(x<0){putchar('-');x=-x;}if(x>9)print(x/10);putchar(x%10+'0');
}

快速读入

int readint(){int x=0, op=1;  char ch = getchar();while(ch < '0' || ch > '9'){ if(ch=='-')op=-1; ch = getchar(); }while(ch >= '0' && ch <= '9'){ x=x*10+ch-'0'; ch = getchar(); }return x*op;
}

并查集

int fa[maxn+10];
void init(int n){for(int i = 0; i <= n; i++)fa[i]=i;}
int find(int x){return x==fa[x]?x:fa[x]=find(fa[x]);}
void merge(int x, int y){x=find(x);y=find(y);if(x!=y)fa[x]=y;}
int count(int n){int cnt=0; for(int i = 1; i <= n; i++)if(fa[i]==i)cnt++;return cnt;}

树状数组

//求逆序对
#include<iostream>
#include<algorithm>
#define maxn 50000
using namespace std;struct node{int val, num;}a[maxn];
bool cmp(node a, node b){return a.val<b.val;}int n, b[maxn];
void add(int x, int v){ for(int i = x; i <= n; i+=i&(-i))b[i]+=v;}
int query(int x){ int ans=0;for(int i=x;i>0;i-=i&(-i))ans+=b[i];return ans;}
/*
int n, m, a[maxn];
void add(int x, int k){for(int i = x; i <= n; i += i&-i)a[i] += k;
}
int query(int x){int ans = 0;for(int i = x; i >= 1; i -= i&-i)ans += a[i];return ans;
}
*/int main(){cin>>n;for(int i = 1; i <= n; i++)cin>>a[i].val,a[i].num=i;sort(a+1,a+n+1,cmp);int ans = 0;for(int i = n; i >= 1; i--){add(a[i].num,1);ans += query(a[i].num-1);}cout<<ans<<'\n';return 0;
}

线段树

//支持区间乘,区间加,区间取模
#include<iostream>
using namespace std;struct SegmentTree{typedef long long LL;#define maxn 500010#define lch p<<1#define rch p<<1|1struct node{LL val, addmark, mulmark;}sgt[maxn<<2];int mod;void build(int p, int l, int r){sgt[p].addmark = 0, sgt[p].mulmark = 1;if(l == r){cin>>sgt[p].val;return ;}int mid = l+r>>1;build(lch,l,mid);build(rch,mid+1,r);sgt[p].val = (sgt[lch].val+sgt[rch].val)%mod;return ;}void pushdown(int p, int l, int r){if(sgt[p].addmark==0&&sgt[p].mulmark==1)return ;//父节点标记LL t1 = sgt[p].addmark, t2 = sgt[p].mulmark;sgt[p].addmark = 0, sgt[p].mulmark = 1;//维护标记int mid = l+r>>1;sgt[lch].mulmark *= t2, sgt[lch].mulmark %= mod;sgt[rch].mulmark *= t2, sgt[rch].mulmark %= mod;sgt[lch].addmark = (sgt[lch].addmark*t2+t1)%mod;sgt[rch].addmark = (sgt[rch].addmark*t2+t1)%mod;//更新值sgt[lch].val = (sgt[lch].val*t2+t1*(mid-l+1))%mod;sgt[rch].val = (sgt[rch].val*t2+t1*(r-mid))%mod;return ;}void add(int p, int l, int r, int L, int R, LL v){if(L<=l && r<=R){sgt[p].val += (r-l+1)*v;  sgt[p].val %= mod;sgt[p].addmark += v;sgt[p].addmark %= mod;return ;}pushdown(p,l,r);int mid = l+r>>1;if(L<=mid)add(lch,l,mid,L,R,v);//是L不是lif(R>mid)add(rch, mid+1, r,L,R,v);sgt[p].val = (sgt[lch].val+sgt[rch].val)%mod;}void times(int p, int l, int r, int L, int R, LL v){if(L<=l && r<=R){sgt[p].val *= v;sgt[p].val %= mod;sgt[p].mulmark *= v;sgt[p].mulmark %= mod;sgt[p].addmark *= v;sgt[p].addmark %= mod;return ;}pushdown(p,l,r);int mid = (l+r)/2;if(L<=mid)times(lch,l,mid,L,R,v);if(R>mid)times(rch,mid+1,r,L,R,v);sgt[p].val = (sgt[lch].val+sgt[rch].val)%mod;}LL query(int p, int l, int r, int L, int R){if(L<=l && r<=R)return sgt[p].val;pushdown(p,l,r);LL mid = l+r>>1, ans = 0;if(L<=mid)ans += query(lch,l,mid,L,R);if(R>mid)ans += query(rch,mid+1,r,L,R);return ans%mod;}
}sgt;int main(){int n, m, q;cin>>n>>q;sgt.mod = q;sgt.build(1,1,n);cin>>m;for(int i = 1; i <= m; i++){int op, l, r, v;cin>>op;if(op==1){cin>>l>>r>>v;sgt.times(1,1,n,l,r,v);}else if(op==2){cin>>l>>r>>v;sgt.add(1,1,n,l,r,v);}else{cin>>l>>r;cout<<(sgt.query(1,1,n,l,r))<<'\n';}}return 0;
}

卢卡斯组合数

LL fac[maxn], inv[maxn];
LL mpow(LL a, LL x) {if(x==0)return 1;LL t = mpow(a, x>>1);if(x%2==0)return t*t%mod;return t*t%mod*a%mod;
}
LL init(){fac[0]=inv[0]=1;for(int i = 1; i < maxn; i++){fac[i]=fac[i-1]*i%mod; inv[i]=mpow(fac[i],mod-2);}return 0;
}
LL C(int x, int y) {if(y<0 || y>x)return 0;return fac[x]*inv[y]%mod*inv[x-y]%mod;
}

数学杂项

//素数
int pri[N];
void get_prime(int n){ //诶氏筛法pri[1] = 1;for(int i = 2; i*i <= n; i++)if(!pri[i])for(int j = 2*i; j <= n; j+=i)pri[j] = 1;
}//数论
LL gcd(LL a, LL b){ return b==0 ? a : gcd(b,a%b); }
LL lcm(LL a, LL b){ return a/gcd(a,b)*b; }
LL exgcd(LL a, LL b, LL &x, LL &y){if(!b){x = 1, y = 0;return a;}LL r = exgcd(b, a%b, x, y);LL t = x;x = y;y = t-a/b*y;return r;
}//快速幂,快速乘
LL mul(LL a, LL b, LL p){LL x = 0;while(b){if(b&1)x=(x+a)%p;a = (a<<1)%p;b >>= 1;}return x;
}
LL mul(LL a, LL b){LL x = 0;while(b){if(b&1)x += a;a <<= 1;b >>= 1;}return x;
}
LL pow(LL a, LL b, LL p){LL x = 1;while(b){if(b&1)x = mul(x,a,p)%p;a = mul(a,a,p)%p;b >>= 1;}return x%p;
}
LL pow(LL a, LL b){LL x = 1;while(b){if(b&1)x = mul(x,a);a = mul(a,a);b >>= 1;}return x;
}//计算几何学
struct Point{ double x, y; }; //点
typedef Point Vector;  //向量
struct Segment{ Point p1, p2; }; //线段
typedef Segment Line;  //直线
class Circle{public:  Point c;  double r;Circle(Point c = Point(), double r = 0.0):c(c),r(r){}
};
//typedef vector<int> Polygon; //多边形

高斯消元

#include<bits/stdc++.h>
using namespace std;
const int maxn = 110;
const double eps=1e-7;int n; double a[maxn][maxn], ans[maxn];
int Gauss(){//1. 用第i个式子消去第i个系数,求得倒三角for(int i = 1; i <= n; i++){//找第i列中系数最大的式子并交换int r = i;for(int j=i+1; j<=n; j++){if(abs(a[r][i])<abs(a[j][i]))r=j;}if(i!=r)swap(a[i],a[r]);//如果下面的都是0,则存在多解.(n-i+1)为自由元个数if(abs(a[i][i])<eps)return 0;//用这个式子去消自己和其他的式子double div = a[i][i];for(int j = i; j <= n+1; j++)a[i][j] /= div;for(int j = i+1; j <= n; j++){div = a[j][i];for(int k = i; k <= n+1; k++)a[j][k] -= a[i][k]*div;}}//2. 回代求答案值ans[n] = a[n][n+1];for(int i = n-1; i >= 1; i--){ans[i] = a[i][n+1];for(int j = i+1; j <= n; j++)ans[i] -= a[i][j]*ans[j];}return 1;
}int main(){cin>>n;for(int i = 1; i <= n; i++)for(int j = 1; j <= n+1; j++)cin>>a[i][j];int ok = Gauss();if(ok==1){for(int i = 1; i <= n; i++)printf("%.2lf\n",ans[i]);}else{printf("No Solution\n");}return 0;
}

离散化模板

#include<bits/stdc++.h>
using namespace std;
const int maxn = 2e5+10;int a[maxn], b[maxn], c[maxn], sum[maxn];int cnt, arr[maxn*3];
void discrete(){sort(arr+1,arr+cnt+1);cnt = unique(arr+1,arr+cnt+1)-arr-1;
}
int query(int x){return lower_bound(arr+1,arr+cnt+1,x)-arr;
}int main(){//inputios::sync_with_stdio(false);int n;  cin>>n;for(int i = 1; i <= n; i++){cin>>a[i];  arr[++cnt] = a[i];}int m;  cin>>m;for(int i = 1; i <= m; i++){cin>>b[i];  arr[++cnt] = b[i];}for(int i = 1; i <= m; i++){cin>>c[i];  arr[++cnt] = c[i];}//solvediscrete();int ans = 0, bt = -1, ct = -1;for(int i = 1; i <= n; i++)sum[query(a[i])]++;//会每种语言的人数for(int i = 1; i <= m; i++){//更新能被看懂最多的电影int x = query(b[i]), y = query(c[i]);if(sum[x]>bt){ans = i; bt = sum[x]; ct = sum[y];}else if(sum[x]==bt && sum[y]>ct){ans = i; bt = sum[x]; ct = sum[y];}}cout<<ans<<endl;return 0;
}
/*
给定一个n*m的网格,每条边上有一个权值。给定每个机器人的出发位置和目标位置。求权值最大。
+ 拆边,每条边拆成2条,第一条容量1,费用c[i],第二条容量inf,费用0;
+ 建超级源汇(s到每个出发位置容量1,费用0,每个目标位置到t容量1,费用0),跑最大费用最大流即可
*/
#include<iostream>
#include<algorithm>
#include<queue>
#include<cstring>
using namespace std;const int N = 1100, M = 100010, inf = 1<<30;//Grape
int tot=1, head[N], Next[M], ver[M], cap[M], cost[M];
void AddEdge(int x, int y, int z, int c){//正向边,初始容量z,单位费用cver[++tot] = y, cap[tot] = z, cost[tot] = c;Next[tot] = head[x], head[x] = tot;//反向边,初始容量0,单位费用-c,与正向边成对存储ver[++tot] = x, cap[tot] = 0, cost[tot] = -c;Next[tot] = head[y], head[y] = tot;
}
//Cost flow
int s, t, incf[N], pre[N];
int dist[N], vis[N];
bool spfa(){queue<int>q;memset(dist,0xcf,sizeof(dist));//-infmemset(vis,0,sizeof(vis));q.push(s); dist[s]=0; vis[s]=1;incf[s] = 1<<30; //到s为止的增广路上各边的最小的剩余容量while(q.size()){int x = q.front(); q.pop(); vis[x] = 0;for(int i = head[x]; i; i = Next[i]){if(!cap[i])continue; //剩余容量为0,不再残量网络中,不遍历int y = ver[i];if(dist[y]<dist[x]+cost[i]){//流量都为1,不用乘dist[y] = dist[x]+cost[i];incf[y] = min(incf[x], cap[i]);pre[y] = i;//记录前驱,用于找方案if(!vis[y])vis[y]=1, q.push(y);}}}if(dist[t] == 0xcfcfcfcf)return false;//汇点不可达,已求出最大流return true;
}
int MaxCostMaxflow(){int flow = 0, cost = 0;while(spfa()){int x = t;while(x != s){int i = pre[x];cap[i] -= incf[t];cap[i^1] += incf[t];//成对存储x = ver[i^1];}flow += incf[t];cost += dist[t]*incf[t];}return cost;
}//Timu
int a, b, n, m, mp[N][N];
void input(){cin>>a>>b;cin>>n>>m;s = 0, t = (n+1)*(m+1)+1;int cnt = 0;for(int i = 0; i <= n; i++)for(int j = 0; j <= m; j++)mp[i][j] = ++cnt;for(int i = 0; i <= n; i++){for(int j = 0; j < m; j++){int x;  cin>>x;AddEdge(mp[i][j],mp[i][j+1],1,x);AddEdge(mp[i][j],mp[i][j+1],inf,0);}}for(int j = 0; j <= m; j++){for(int i = 0; i < n; i++){int x;  cin>>x;AddEdge(mp[i][j],mp[i+1][j],1,x);AddEdge(mp[i][j],mp[i+1][j],inf,0);}}for(int i = 0; i < a; i++){int x, y, z;  cin>>z>>x>>y;AddEdge(s,mp[x][y],z,0);}for(int i = 0; i < b; i++){int x, y, z;  cin>>z>>x>>y;AddEdge(mp[x][y],t,z,0);}return ;
}int main(){ios::sync_with_stdio(false);input();cout<<MaxCostMaxflow()<<'\n';return 0;
}

最小费用最大流

/*
一个有n个数的环。每次只能向相邻的数移动,移动一个数代价为1。求让所有数相等的最小代价。
+ 从s向每个点连容量为库存量,费用为0的边
+ 从每个点向t连容量为平均库存量,费用为0的边
+ 在相邻两个点之间连容量为inf,费用为1的边
+ 然后跑最小费用最大流即可
*/
#include<iostream>
#include<algorithm>
#include<queue>
#include<cstring>
using namespace std;const int N = 110*2+10, M = 1000+10, inf = 1<<30;//Grape
struct Edge{int from, to, cap, flow, cost;
}e[M];
int tot=1, head[N], Next[M];
void AddEdge(int u, int v, int w, int c){//正向边,初始容量w,单位费用ce[++tot].from = u, e[tot].to = v, e[tot].cap = w, e[tot].flow = 0, e[tot].cost = c;Next[tot] = head[u], head[u] = tot;//反向边,初始容量0,单位费用-c,与正向边成对存储e[++tot].from = v, e[tot].to = u, e[tot].cap = 0, e[tot].flow = 0, e[tot].cost = -c;Next[tot] = head[v], head[v] = tot;
}//Cost flow
int s, t, incf[N], pre[N];
int dist[N], vis[N];
bool spfa(){queue<int>q;memset(dist,0x3f,sizeof(dist));//infmemset(vis,0,sizeof(vis));q.push(s); dist[s]=0; vis[s]=1;incf[s] = inf; //到s为止的增广路上各边的最小的剩余容量while(q.size()){int x = q.front(); q.pop(); vis[x] = 0;for(int i = head[x]; i; i = Next[i]){if(e[i].flow==e[i].cap)continue; //剩余容量为0,不再残量网络中,不遍历int y = e[i].to;if(dist[y]>dist[x]+e[i].cost){dist[y] = dist[x]+e[i].cost;incf[y] = min(incf[x], e[i].cap-e[i].flow);pre[y] = i;//记录前驱,用于找方案if(!vis[y])vis[y]=1, q.push(y);}}}if(dist[t] == 0x3f3f3f3f)return false;//汇点不可达,已求出最大流return true;
}
int maxflow(){int flow = 0, cost = 0;while(spfa()){int x = t;while(x != s){int i = pre[x];e[i].flow += incf[t];e[i^1].flow -= incf[t];x = e[i].from;}flow += incf[t];cost += dist[t]*incf[t];}return cost;
}//Timu
int n, a[110], sum, ans;int main(){ios::sync_with_stdio(false);cin>>n; for(int i = 1; i <= n; i++)cin>>a[i],sum+=a[i];  sum/=n;s = 0, t = n+1;for(int i = 1; i <= n; i++){AddEdge(s,i,a[i],0);AddEdge(i,t,sum,0);AddEdge(i,i+1>n?1:i+1,inf,1);AddEdge(i,i-1<1?n:i-1,inf,1);}cout<<maxflow()<<'\n';return 0;
}

图论杂项

//图论算法模板
struct UndirectedEdge{ //图的边集存储int u, v, w;UndirectedEdge(){}UndirectedEdge(int u, int v, int w): u(u),v(v),w(w){}bool operator < (const UndirectedEdge & other)const{return w < other.w;}
};
//Kruskal
struct Kruskal{int n, m;UndirectedEdge edges[N];inline int kruskal(){int sum = 0,  count = 0;UnionFindSet ufs(n);  std::sort(edges, edges+m);  //对所有边进行排序for(int i = 1; i <= m; i++){if(ufs.find(edges[i].u) != ufs.find(edges[i].v)){ufs.merge(edges[i].u,edges[i].v);sum += edges[i].w;count++;if(count == n-1) break;}}return sum;}
};//有向图强连通分量
namespace Kosaraju{int n, m;vector<int>G[N], rG[N];vector<int>vs, cmp[N];int vis[N], book[N], cnt;void dfs(int u){if(vis[u])return ;vis[u] = 1;for(int i = 0; i < G[u].size(); i++)dfs(G[u][i]);vs.push_back(u);}void rdfs(int u){if(book[u])return ;book[u] = cnt;cmp[cnt].push_back(u);for(int i = 0; i < rG[u].size(); i++)rdfs(rG[u][i]);}
};

STL速查

priority_queue<int, vector<int>, greater<int> >q;  //小根堆
priority_queue<int, vector<int>, less<int> >q; //大根堆
struct node{int x, y;};//比较函数
struct cmp{bool operator()(node a, node b){return a.x > b.x;}
};
priority_queue<node, vector<node>, cmp>q;//lower_bound:返回第一个大于等于x的位置
int p1=lower_bound(a,a+n,x)-a;
//upper_bound:返回第一个大于x的位置
int p2=upper_bound(a,a+n,x)-a;
//lower_bound2:返回数组中第一个小于或等于x的值
int p3=lower_bound(a,a+n,x,greater<int>())-a;
//upper_bound2:返回数组中第一个小于x的值
int p4=upper_bound(a,a+n,x,greater<int>())-a;struct cmp_lower{bool operator () (int a,int b){return index[a]<b;}
};
int lower_result=lower_bound(ar.begin(),ar.end(),x+1,cmp_lower())-ar.begin();int count = unique(a, a+n)-a;
for(int i = 0; i < count; i++)printf("%d ", a[i]);multiset
multimap
unordered_set/unordered_multiset
unordered_map/unordered_multimapvoid setting(){set<int>myset; //声明int类型的集合(突然发现重名好像不会炸233333)//1. 基本操作myset.insert(233);  //往里面添加元素(重复插入无效)myset.erase(233);  //删除里面的某个元素(如果不存在该元素则不操作)(这里也可以用迭代器删除区间)myset.count(233); //查询集合中是否存在某个元素myset.clear();   //清空集合//2. 迭代器myset.insert(233);  myset.insert(322);set<int>::iterator it;  //如果重名声明迭代器的时候会炸掉set<int>::reverse_iterator rit; //反向迭代器for(it = myset.begin(); it != myset.end(); it++){cout<<*it<<" ";}cout<<"\n";for(rit = myset.rbegin(); rit != myset.rend(); rit++){cout<<*rit<<" ";}cout<<"\n";//3. 熟练搞事cout<< (myset.find(233)==myset.begin()) <<" \n"; //查找键值的位置并返回迭代器cout<< *myset.lower_bound(234)<<"\n";  //返回第一个>=key的元素的迭代器cout<< *myset.upper_bound(233)<<"\n";  //返回第一个>key的元素的迭代器
}
void maping(){ map<int,int>mymap; //左键右值//1. 基本操作,,同为关联容器,基本和set差不多吧mymap[5] = 7;  //添加元素(注意 "mymap[0];" 同样往map中添加了元素,只是没有赋值而已)//2. 迭代器map<int,int>::iterator it = mymap.begin();cout<<(it->first)<<" "<<(it->second)<<"\n"; //map遍历时访问的是pair类型
}
void stringing(){string str = "123456789";  char ch[110]="233";//构造函数str = string(ch); //用c语言字符串s初始化str = string(5,'c');  //用5个字符c初始化string s1 = str;  //赋值操作//基本特性str.size(); //返回大小//各种操作str.substr(0, 2);  //返回子串,返回0开始的由两个字符组成的字符串}

矩阵快速幂

/*
题意:给你一个233矩阵,横纵坐标都是从0开始,第一行为0 233 2333 23333…… 依次往下延续,第一列除(0,0)坐标点之外,让你自由输入n个数,整个矩阵满足关系式:
a(i,j)= a(i-1,j)+a(i,j-1) ( i,j ≠ 0 且 a(i,j)表示矩阵中坐标为(i,j)的点的值)
求坐标为(n,m)的数的值。
*/
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
typedef long long ll;
const int mod=10000007;
const int N=1e9+10;ll n,M,arr[15],ans;struct Matrix{ll m[15][15];Matrix(){memset(m,0,sizeof(m));for(int i=0;i<=n+1;i++){m[i][n+1]=1;if(i==n+1) continue;m[i][0]=10;for(int j=1;j<=i;j++)m[i][j]=1;}}void clear(){memset(m,0,sizeof(m));for(int i=0;i<=n+1;i++)m[i][i]=1;}void display(){cout<<"Matrix's begin:"<<endl;for(int i=0;i<=n+1;i++)for(int j=0;j<=n+1;j++)if(j<n+1) cout<<m[i][j]<<" ";else cout<<m[i][j]<<endl;cout<<"Matrix's end:"<<endl;}friend Matrix operator*(Matrix a,Matrix b){Matrix ans;for(int i=0;i<=n+1;i++)for(int j=0;j<=n+1;j++){ans.m[i][j]=0;for(int k=0;k<=n+1;k++)ans.m[i][j]+=a.m[i][k]*b.m[k][j]%mod;}return ans;}friend Matrix operator^(Matrix base,ll k){Matrix ans;ans.clear();while(k){if(k&1) ans=ans*base;base=base*base;k>>=1;}return ans;}};int main(){
//  cout<<"hello"<<endl;while(~scanf("%lld%lld",&n,&M)){Matrix base;ans=0;arr[0]=23;arr[n+1]=3;for(int i=1;i<=n;i++){scanf("%lld",&arr[i]);}base=base^M;
//      base.display();for(int i=0;i<=n+1;i++){ans+=arr[i]*base.m[n][i];
//          cout<<base.m[n][i]<<endl;}printf("%d\n",ans%mod);}return 0;
}
/*3 11 2 323        10 0 0 0 1              233             a1      10 1 0 0 1              a1+23*10+3a2    *   10 1 1 0 1  ^m  =       a2+a1+23*10+3       ^(m-1)a3        10 1 1 1 1              a3+a2+a1+23*10+33               0  0 0 0 1              3
*/

ACM常用单词

abbreviation省略;缩写adjacent sequence elements相邻的元素串algebraic term代数项alphabetical order字典序alternately rise and fall交替上升和下降approximate string matching 模糊匹配arbitrary precision arithmetic 高精度计算arithmetic mean 算数平均值ascending order升序aspect ratio固定长宽比axis;axes轴bandwidth reduction 带宽压缩base 底边;幂的底数calculate计算calendrical calculations 日期clique 最大团clockwise order顺时针方向顺序columns列combinatorial problems 组合问题comma逗号composite numbers 合数computational geometry 计算几何concave 凹的connected components 连通分支constrained and unconstrained optimization 最值问题convex hull 凸包convex凸coordinates坐标cryptography 密码cubes立方data structures 基本数据结构deformed变形的denote表示;标志;预示;象征determinants and permanents 行列式diagonal对角dial钟面,拨打dictionaries 字典difference 差digit位数;数字discrete fourier transform 离散傅里叶变换distinct 不同的;独一无二的divisor 因子,除数divisor 因子;分母drawing graphs nicely 图的描绘drawing trees 树的描绘edge and vertex connectivity 割边/割点edge coloring 边染色embed插入equation方程式;等式equivalent equation同解方程;等价方程eulerian cycle欧拉循环even偶数executed 执行的;生效的exponent 指数;幂factorial 阶乘factorial 阶乘; 因子的,阶乘的factoring 因子分解feedback edge/vertex set 最大无环子图finite state machine minimization 有穷自动机简化foggiest idea概念follow by跟随,其后fraction:分数;小部分generating graphs 图的生成generating partitions 划分生成generating permutations 排列生成generating subsets 子集生成graph data structures 图graph isomorphism 同构graph partition 图的划分graph problems-polynomial 图论-多项式算法grid网格;方格;(地图上的)坐标方格horizontal or vertical direction水平和垂直方向improper fraction 假分数in the range of 在....范围内in the shape of a cross十字形indentical相同的independent set 独立集inequality不等式intersection detection 碰撞测试intersection横断;横切;交叉intersect相交interval区间kd-trees 线段树knapsack problem 背包问题like terms ,similar terms同类项linear equation线性方程linear programming 线性规划literal coefficient字母系数logarithm 对数longest common substring 最长公共子串loop环maintaining line arrangements 平面分割matching 匹配matrix multiplication 矩阵乘法matrix 矩阵matrix矩阵mean 平均值medial-axis transformation 中轴变换median and selection 中位数minimal volume最小体积minimum spanning tree 最小生成树mixed number 带分数motion planning 运动规划motion多边形nearest neighbor search 最近点对查询negative负network flow 网络流numerator 分子numerical coefficient 数字系数numerical problems 数值问题odd奇数optimal最佳的original equation原方程origin原点overbrim溢出parity property奇偶性planarity detection and embedding 平面性检测和嵌入ploygon-shaped faces/ polygon多边形point location 位置查询polygon partitioning 多边形分割positive正present error呈现错误prime 质数priority queues 优先队列proceed运行process处理proper fraction真分数quadrant象限,四分之一圆quotient 商random number generation 随机数生成range search 范围查询range值域rate of convergence 收敛速度robustness 鲁棒性root sign 根号round()四舍五入(当取舍位为5时,若取舍位数前的小数为奇数则直接舍弃,若为偶数则向上取舍)rounded to n decimal places 精确到小数点后n位rows 行scenario方案;(可能发生的)情况;searching 查找segment 段;分割serial连续的series系列set and string problems 集合与串的问题set cover 集合覆盖set data structures 集合set packing 集合配置shape similarity 相似多边形common superstring公共父串shortest path 最短路径simplifying polygons 多边形化简solving linear equations 线性方程组sorting 排序specify 指定stack overflow堆栈溢出steiner tree steiner树string matching 模式匹配text compression 压缩there are no special punctuation symbols or spacingrules没有特殊标点符号或间距的规则times乘topological sorting 拓扑排序transitive closure and reduction 传递闭包triangle inequality三角不等式triangulation 三角剖分two-dimensional array二维数组union 并集unique identifier唯一的标识符variable变量vertex coloring 点染色vertex cover 点覆盖vertex顶点voronoi diagrams voronoi图 weighted average 加权平均值

第45届ICPC 昆明站 临时模板补充相关推荐

  1. 训练实录 | 第 45 届ICPC沈阳站(牛客重现赛)

    第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(沈阳)(重现赛) 传送门:ICPC沈阳 F - The Witchwood 这重现赛,这数据,我既然被hack了,我写的代码太拉跨了????? ...

  2. 第45届ICPC沈阳站部分题解(D、F、G、H、I、J、K)

    文章目录 D-前缀和思想+dfs F-贪心 G H-双指针+dp 题意 思路 代码 I-追及问题+裴蜀定理 J-可持久化线段树 K-前缀和+积分的定义 题意 思路 参考链接 传送门 本文CSDN 本文 ...

  3. 2019-2020 ICPC昆明站 爆炸记兼赛后总结(日记向)

    day -1 热身赛 + 萨莉亚,热身赛1h切完,但是罚时感人. 恰完之后,从204往寝室走的路上,liangs333表示,我们队是不是很久没怎么见过构造题了?然后前几局训练赛好像罚时有点炸,明天要注 ...

  4. 2020 ICPC 昆明站 I(Mr. Main and Windmills)

    题目链接 题目大意: 给定 n 个点 m 个询问, 在给出一条线段,人从线段的st走到ed,每次询问查询第h个点在视野中发生第k次交换时人所处的位置. 思路: 先n2枚举预处理每组直线,二维结构体数组 ...

  5. 第 45 届ICPC区域赛(南京)记录

    题在这里 K - Co-prime Permutation 题意:让你从1~n的数字序列中,选出每一个数字放到一个位置i使得gcd(a[i],i) = 1. 解:相邻的数字互质,故将需要gcd(a[i ...

  6. 第46届ICPC昆明 补题(热身赛 + 正式赛)(K/D/F/G)

    热身赛 A.水题 int t, f, s, p, c;for (int i = 0; i < 2; ++i){cin >> t >> f >> s >& ...

  7. 第45届国际大学生程序设计竞赛(ICPC)沈阳站太原理工大学收获1枚铜牌

    第45届ICPC沈阳区域赛,于2021年7月18日在东北大学南湖校区举行.太原理工大学2个队参加比赛,由20级中学没有学过编程的3名同学组成的队,首次参加现场赛并获得铜奖.

  8. 第45届国际大学生程序设计竞赛(ICPC)银川站太原理工大学收获4枚奖牌

    第45届国际大学生程序设计竞赛(ICPC)银川站,由宁夏理工学院承办,于2021年5月15-16日在宁夏的石嘴山市进行. 太原理工大学在比赛中获得2银2铜共4枚奖牌的好成绩. 参加本次比赛的四个队,涵 ...

  9. 第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(济南)(重现赛)

    第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(济南)(重现赛) 导语 涉及的知识点 题目 C D G J M 参考文献 导语 日常的队内集训,开始的时候状态其实很好,但是到了后两题就出现了 ...

最新文章

  1. 生信分析必须了解的4种文件格式
  2. 每次都要清理cache?强制不让浏览器缓存!
  3. python爬网盘数据犯法吗_python爬取疫情数据的源码
  4. 通过Java编写一个服务器理解动态Web,静态Web
  5. 与虚拟现实技术相关联的计算机技术,虚拟现实技术与其他技术的关系是什么?-VR-形象思维VR...
  6. 模板共享指针(shared_ptr)原理实现
  7. Objective-C 2.0 with Cocoa Foundation--- 6,NSObject的奥秘
  8. 2017-2018-2课表
  9. elasticsearch6.1.3 集成分词器
  10. SqlParameter的使用
  11. TwinCAT 3 EL7211模块控制倍福伺服
  12. java md5加密 jar包,java md5加密工具类学习示例
  13. 老男孩五篇重要文章:http://oldboy.blog.51cto.com/2561410/1184139
  14. foobar2000播放的一些使用技巧
  15. 5w 字 | 172 图 | 超级赛亚级 Spring Cloud 实战
  16. Juc_无juc情况
  17. 云账户合法吗_云支付合法吗?
  18. 文件/文件夹强制删除工具:IObit Unlocker绿色版
  19. 矩阵的Kronecker积的相关结论
  20. Windows添加route

热门文章

  1. matlab 深度学习
  2. Python 标准库 —— os 路径(os.path)
  3. mac 下 hadoop、spark 的安装及配置
  4. 【剑指 offer】(十)—— 二进制形式 1 的个数
  5. android返回按钮实现,Android实现返回键操作思路
  6. linux svn 可视化工具,CentOS 安装SVN以及可视化管理工具iF.SVNAdmin
  7. python从入门到精通需要多久-python从入门到精通需要多久?你需要先明白这两个点...
  8. python软件下载3版本-Python软件下载-Python最新版 v3.7.3 - 动力软件园
  9. 下载python教程-Python基础教程下载【黑马程序员完整版】
  10. python爬虫教程-Python爬虫五大零基础入门教程