# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
123785 |
2019-07-02T06:46:33 Z |
송준혁(#3032) |
Meetings (JOI19_meetings) |
C++14 |
|
3 ms |
632 KB |
#include <bits/stdc++.h>
#include "meetings.h"
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
vector<int> adj[2020];
bool chk[2020];
void add(int u, int p, int w){
for (int &v : adj[u]){
if (v == p) continue;
int x = Query(u, v, w);
if (x == u) continue;
else if (x == v){
add(v, u, w);
return;
}
else{
chk[x] = true;
for (int &k : adj[v]) if (k == u) k = x;
v = x;
adj[x].push_back(u);
adj[x].push_back(v);
if (x != w){
adj[x].push_back(w);
adj[w].push_back(x);
}
return;
}
}
adj[u].push_back(w);
adj[w].push_back(u);
}
void Solve(int N) {
for (int i=1; i<N; i++){
if (chk[i]) continue;
add(0, -1, i);
}
for (int u=0; u<N; u++) for (int v : adj[u]) if (u < v) Bridge(u, v);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Correct |
2 ms |
376 KB |
Output is correct |
4 |
Incorrect |
2 ms |
380 KB |
Wrong Answer [1] |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Correct |
2 ms |
376 KB |
Output is correct |
4 |
Incorrect |
2 ms |
380 KB |
Wrong Answer [1] |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Correct |
2 ms |
376 KB |
Output is correct |
4 |
Incorrect |
2 ms |
380 KB |
Wrong Answer [1] |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
632 KB |
Wrong Answer [1] |
2 |
Halted |
0 ms |
0 KB |
- |