摘要:
1 #include 2 using namespace std; 3 4 const int maxn = 2*1e5+5; 5 vectorp[maxn]; 6 vectorc; 7 bool check[maxn]; 8 9 10 void dfs(int x) { 11 check[x] = true; 12 c.push_back(x); 13... 阅读全文
摘要:
1 #include 2 #include 3 using namespace std; 4 5 const int maxn = 1e5 + 5; 6 int a[maxn]; 7 8 int main(){ 9 int t; 10 cin >> t; 11 while(t--){ 12 int n; 13 ci... 阅读全文