摘要:
queue q; st[1] = true; // 表示1号点已经被遍历过 q.push(1); while (q.size()) { int t = q.front(); q.pop(); for (int i = h[t]; i != -1; i = ne[i]) { int j = e[i]; 阅读全文
摘要:
include<bits/stdc++.h> using namespace std; const int N = 100; int n; // 定义二叉树结构体 struct Tree { int x; // 节点的值 Tree* left; // 左子树 Tree* right; // 右子树 阅读全文
摘要:
include<bits/stdc++.h> using namespace std; const int N=1010; int n,m,g[N][N],ans,t,ti[N][N],f[N][N]; bool st[N][N]; int np[2][2]={{1,0},{0,1}}; int d 阅读全文
摘要:
include<bits/stdc++.h> using namespace std; const int N=100100; typedef pair<int,int> pii; int n,r,l,q,id,a[N]; set s; int main(){ ios::sync_with_stdi 阅读全文