# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
823957 |
2023-08-13T10:43:55 Z |
Kahou |
Meetings (JOI19_meetings) |
C++14 |
|
1719 ms |
1092 KB |
#include<bits/stdc++.h>
#include"meetings.h"
using namespace std;
#define F first
#define S second
#define endl '\n'
#define mk make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 2050;
int n, sub[MAXN];
bool mark[MAXN][MAXN];
void Solve(int N) {
n = N;
sub[0] = n-1;
for (int u = 1; u < n; u++) {
mark[0][u] = 1;
}
for (int u = 1; u < n; u++) {
for (int v = u+1; v < n; v++) {
int lca = Query(0, u, v);
if (lca == u) {
mark[u][v] = 1;
sub[u]++;
}
else if (lca == v) {
mark[v][u] = 1;
sub[v]++;
}
}
}
for (int u = 1; u < n; u++) {
int par = 0;
for (int v = 0; v < n; v++) {
if (mark[v][u] && sub[v] < sub[par]) par = v;
}
Bridge(par, u);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
336 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Wrong Answer [3] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
336 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Wrong Answer [3] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
336 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Wrong Answer [3] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1719 ms |
1092 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |