# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
244501 | 2020-07-04T07:45:25 Z | dwsc | Pipes (CEOI15_pipes) | C++14 | 1394 ms | 23692 KB |
#include <bits/stdc++.h> using namespace std; int n,m; vector<int> adj[30010]; int low[30010],num[30010],parent[30010]; int counter; void articulationPoint(int u){ // cout << u; low[u] = num[u] = counter++; for (int j = 0; j < adj[u].size(); j++){ int v = adj[u][j]; if (num[v] == -1){ parent[v] = u; articulationPoint(v); if (low[v] > num[u]) cout << u << " " << v << "\n"; low[u] = min(low[u],low[v]); } else if (v != parent[u]){ low[u] = min(low[u],low[v]); } } } int main(){ cin >> n >> m; for (int i = 0; i < m; i++){ int a,b; cin >> a >> b; adj[a].push_back(b); adj[b].push_back(a); } for (int i = 1; i <= n; i++){ num[i] = -1; } for (int i = 1;i <= n; i++) if (num[i] == -1) articulationPoint(i); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 1024 KB | Output is correct |
2 | Incorrect | 5 ms | 1024 KB | Wrong number of edges |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 14 ms | 1536 KB | Output is correct |
2 | Incorrect | 18 ms | 1280 KB | Wrong number of edges |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 457 ms | 9336 KB | Output is correct |
2 | Correct | 433 ms | 8440 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 825 ms | 12664 KB | Output is correct |
2 | Runtime error | 973 ms | 17120 KB | Memory limit exceeded (if you are sure your verdict is not MLE, please contact us) |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1394 ms | 23692 KB | Memory limit exceeded (if you are sure your verdict is not MLE, please contact us) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 6 ms | 1920 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 7 ms | 1792 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 6 ms | 1792 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 6 ms | 1792 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 6 ms | 1792 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |