# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
573412 | amunduzbaev | Joker (BOI20_joker) | C++17 | 554 ms | 20764 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |