# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1005494 | 2024-06-22T13:49:09 Z | vjudge1 | Party (POI11_imp) | C++17 | 476 ms | 1872 KB |
// // main.cpp // IntensiveCamp 2 2024 // // Created by Ali AlSalman on 17/05/2024. // #include <bits/stdc++.h> #define endl '\n' using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n, m; cin>>n>>m; set<int> nodes; for (int i = 1; i <= n; i++) nodes.insert(i); vector<vector<bool>> con(n + 1, vector<bool>(n + 1)); while (m--) { int a, b; cin>>a>>b; con[a][b] = con[b][a] = true; } for (int i = 1; i <= n; i++) for (int j = i + 1; j <= n; j++) { if (nodes.find(i) != nodes.end() && nodes.find(j) != nodes.end() && !con[i][j]) { nodes.erase(i); nodes.erase(j); } } int reqRes = n / 3; for (auto node = nodes.begin(); reqRes--; node++) cout<<*node<<" "; cout<<endl; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 1 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 348 KB | Output is correct |
2 | Correct | 9 ms | 348 KB | Output is correct |
3 | Correct | 9 ms | 344 KB | Output is correct |
4 | Correct | 15 ms | 348 KB | Output is correct |
5 | Correct | 9 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 8 ms | 348 KB | Output is correct |
2 | Correct | 40 ms | 656 KB | Output is correct |
3 | Correct | 37 ms | 600 KB | Output is correct |
4 | Correct | 36 ms | 856 KB | Output is correct |
5 | Correct | 38 ms | 600 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 12 ms | 348 KB | Output is correct |
2 | Correct | 88 ms | 1112 KB | Output is correct |
3 | Correct | 98 ms | 868 KB | Output is correct |
4 | Correct | 103 ms | 860 KB | Output is correct |
5 | Correct | 91 ms | 872 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 27 ms | 604 KB | Output is correct |
2 | Correct | 133 ms | 1012 KB | Output is correct |
3 | Correct | 134 ms | 856 KB | Output is correct |
4 | Correct | 129 ms | 860 KB | Output is correct |
5 | Correct | 135 ms | 1008 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 83 ms | 860 KB | Output is correct |
2 | Correct | 167 ms | 1140 KB | Output is correct |
3 | Correct | 174 ms | 1116 KB | Output is correct |
4 | Correct | 168 ms | 1112 KB | Output is correct |
5 | Correct | 153 ms | 1116 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 161 ms | 1140 KB | Output is correct |
2 | Correct | 236 ms | 1116 KB | Output is correct |
3 | Correct | 229 ms | 1116 KB | Output is correct |
4 | Correct | 227 ms | 1112 KB | Output is correct |
5 | Correct | 228 ms | 1312 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 233 ms | 1112 KB | Output is correct |
2 | Correct | 275 ms | 1368 KB | Output is correct |
3 | Correct | 280 ms | 1372 KB | Output is correct |
4 | Correct | 293 ms | 1468 KB | Output is correct |
5 | Correct | 288 ms | 1620 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 256 ms | 1620 KB | Output is correct |
2 | Correct | 341 ms | 1600 KB | Output is correct |
3 | Correct | 370 ms | 1372 KB | Output is correct |
4 | Correct | 341 ms | 1372 KB | Output is correct |
5 | Correct | 332 ms | 1368 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 296 ms | 1368 KB | Output is correct |
2 | Correct | 387 ms | 1772 KB | Output is correct |
3 | Correct | 394 ms | 1772 KB | Output is correct |
4 | Correct | 392 ms | 1628 KB | Output is correct |
5 | Correct | 415 ms | 1780 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 372 ms | 1816 KB | Output is correct |
2 | Correct | 420 ms | 1816 KB | Output is correct |
3 | Correct | 445 ms | 1820 KB | Output is correct |
4 | Correct | 416 ms | 1872 KB | Output is correct |
5 | Correct | 476 ms | 1624 KB | Output is correct |