# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
365316 | negar_a | Making Friends on Joitter is Fun (JOI20_joitter2) | C++14 | 1467 ms | 96748 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;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define mp make_pair
#define pii pair <ll, ll>
#define fast_io ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define F first
#define S second
const ll maxn = 3e5 + 10;
ll par[maxn], sz[maxn];
set <ll> in[maxn], inc[maxn];
set <pii> out[maxn];
queue <pii> q;
ll ans = 0;
ll find_par(ll x){
if(x == par[x])
return x;
return par[x] = find_par(par[x]);
}
inline bool add_edge(ll a, ll b){
b = find_par(b);
ll p = find_par(a);
if(p == b || out[p].find(mp(a, b)) != out[p].end()){
return false;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |