# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
203298 | abra_stone | Meetings (JOI19_meetings) | C++14 | 8 ms | 1144 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 "meetings.h"
#include <cstring>
#define N 55
int v[N][N][N];
int query(int p, int q, int r) {
if (v[p][q][r] != -1) return v[p][q][r];
v[p][q][r] = v[p][r][q] = v[q][p][r] = v[q][r][p] = v[r][p][q] = v[r][q][p] = Query(p, q, r);
}
void Solve(int n) {
int i, j, k, t;
memset(v, -1, sizeof(v));
for (i = 0; i < n; i++) {
for (j = i + 1; j < n; j++) {
for (k = 0; k < n; k++) {
if (k == i || k == j) continue;
t = query(i, j, k);
if (t != i && t != j) break;
}
if (k == n) Bridge(i, j);
}
}
}
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... |