# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
682033 | ParsaS | Making Friends on Joitter is Fun (JOI20_joitter2) | C++17 | 1988 ms | 106496 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.
// In the name of God
//-MILY-
#pragma GCC optimize("O2", "unroll-loops")
#include<bits/stdc++.h>
using namespace std;
#define fi firsst
#define se second
#define mp make_pair
#define pb push_back
typedef long long ll;
const int N = 1e5 + 5;
int n, m;
set<pair<int, int> > st;
vector<int> Q;
int par[N], sz[N];
ll ans;
vector<int> ver[N];
set<int> out[N], in[N], OUT[N];
map<int, int> cnt[N];
int get(int v) {
return par[v] == v ? v : par[v] = get(par[v]);
}
inline void unite(int x, int y) {
int dx = out[x].size() + in[x].size();
int dy = out[y].size() + in[y].size();
if (sz[x] > sz[y])
swap(x, y);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |