摘要:
左偏树学习笔记 #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int fa[N],ls[N],rs[N],dist[N],val[N],id[N]; bool del[N]; int n,m,cnt; int 阅读全文
摘要:
#include <bits/stdc++.h> using namespace std; int gcd(int x,int y){ return y?gcd(y,x%y):x; } int main() { int n; cin >> n; for(int i = 1,x,ans = 0; i 阅读全文