# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
745450 | Alexandruabcde | Marshmallow Molecules (CCO19_day2problem2) | C++14 | 140 ms | 24576 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 pair <int, int> PII;
constexpr int NMAX = 1e5 + 5;
int N, M;
set <int> G[NMAX];
map <PII, int> mp;
void Unite (int x, int y) {
if (G[x].size() > G[y].size()) swap(G[x], G[y]);
for (auto it : G[x])
G[y].insert(it);
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cin >> N >> M;
for (int i = 1; i <= M; ++ i ) {
int x, y;
cin >> x >> y;
# | 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... |