#include "meetings.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300;
int save[MAXN][MAXN][MAXN];
int get(int a, int b, int c) {
if (a > b) swap(a, b);
if (a > c) swap(a, c);
if (b > c) swap(b, c);
if (save[a][b][c] != -1) return save[a][b][c];
return save[a][b][c] = Query(a, b, c);
}
void Solve(int n) {
memset(save, -1, sizeof save);
for (int u = 0; u < n; u++) {
for (int v = u + 1; v < n; v++) {
bool isEdge = true;
for (int w = 0; w < n && isEdge; w++) if (u != w && v != w) {
if (get(u, v, w) == w) isEdge = false;
}
if (isEdge) Bridge(u, v);
}
}
}
| # | 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... |