Submission #573412

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5734122022-06-06 14:47:18amunduzbaevJoker (BOI20_joker)C++17
100 / 100
554 ms20764 KiB
#include "bits/stdc++.h"
using namespace std;
#define ar array
//~ #define int long long
const int N = 2e5 + 5;
vector<int> edges[N];
int sz[N], par[N], c[N], is[N], R[N];
ar<int, 2> e[N];
signed main(){
ios::sync_with_stdio(0); cin.tie(0);
int n, m, q; cin>>n>>m>>q;
for(int i=1;i<=m;i++){
cin>>e[i][0]>>e[i][1];
edges[e[i][0]].push_back(e[i][1]);
edges[e[i][1]].push_back(e[i][0]);
}
for(int i=0;i<N;i++) sz[i] = 1, par[i] = i;
function<ar<int, 2>(int)> f = [&](int x) -> ar<int, 2>{
if(par[x ] == x) return {x, c[x]};
auto t = f(par[x]);
return {t[0], t[1] ^ c[x]};
};
int cnt = 0;
vector<ar<int, 3>> last;
auto merge = [&](int a, int b){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...