# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
623601 | ACGN | Fountain Parks (IOI21_parks) | C++17 | 1 ms | 212 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 int long long
#define vi vector<int>
#define pii pair<int,int>
#define vii vector<pii>
#define pb push_back
#include "parks.h"
struct dsu {
int D[3][2];
dsu() {
D[0][0] = 0;
D[0][1] = 0;
D[1][0] = 0;
D[1][1] = 0;
D[2][0] = 0;
D[2][1] = 0;
}
void join(int x1,int x2,int y1,int y2) {
x1 = x1 / 2 - 1;x2 = x2 / 2 - 1;
y1 /= 2;y2 /= 2;
int m = min(D[x1][y1], D[x2][y2]);
int M = min(D[x1][y1], D[x2][y2]);
for (int i = 0;i < 3;i++) {
for (int j = 0;j < 2;j++) {
if (D[i][j] == M) D[i][j] = m;
}
}
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |