# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
596019 | 2022-07-14T09:21:14 Z | proma | 낙하산 고리들 (IOI12_rings) | C++17 | 4000 ms | 30776 KB |
#include <bits/stdc++.h> using namespace std; int n, cnt = 0; vector <int> deg; vector <vector <int>> g; void Init(int N_) { n = N_; deg.resize(n, 0); g.resize(n); } void Link(int A, int B) { deg[A] ++; deg[B] ++; g[A].push_back(B); g[B].push_back(A); if (deg[A] == 3) cnt ++; if (deg[B] == 3) cnt ++; } int CountCritical() { int res = 0; for (int v = 0; v < n; v ++) { int cur = 0; deg[v] = 0; for (auto i: g[v]) { deg[i] --; } int flag = 1; for (int i = 0; i < n; i ++) { if (deg[i] > 2) flag = 0; } res += flag; deg[v] = g[v].size(); for (auto i: g[v]) { deg[i] ++; } } return res; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 18 ms | 576 KB | Output is correct |
3 | Correct | 25 ms | 632 KB | Output is correct |
4 | Incorrect | 1 ms | 340 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 4099 ms | 30776 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 18 ms | 576 KB | Output is correct |
3 | Correct | 25 ms | 632 KB | Output is correct |
4 | Incorrect | 1 ms | 340 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 18 ms | 576 KB | Output is correct |
3 | Correct | 25 ms | 632 KB | Output is correct |
4 | Incorrect | 1 ms | 340 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 18 ms | 576 KB | Output is correct |
3 | Correct | 25 ms | 632 KB | Output is correct |
4 | Incorrect | 1 ms | 340 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |