# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
253426 | 2020-07-28T04:15:20 Z | edisonhello | Party (POI11_imp) | C++14 | 1150 ms | 33656 KB |
#include <iostream> #include <cassert> #include <cstdio> #include <bitset> #include <vector> #include <utility> #include <algorithm> using namespace std; bitset<3005> g[3005], del; int main() { int n, m; scanf("%d%d", &n, &m); while (m--) { int u, v; scanf("%d%d", &u, &v); --u, --v; g[u][v] = g[v][u] = 1; } while (true) { bool z = 0; for (int i = 0; i < n; ++i) if (!del[i]) for (int j = i + 1; j < n; ++j) if (!del[j] && !g[i][j]) { del[i] = del[j] = 1; z = 1; break; } if (!z) break; } for (int i = 0, j = 0; j < n / 3; ++i) { if (!del[i]) { ++j; cout << i + 1 << ' '; } } cout << '\n'; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | Output is correct |
2 | Correct | 1 ms | 384 KB | Output is correct |
3 | Correct | 1 ms | 384 KB | Output is correct |
4 | Correct | 1 ms | 384 KB | Output is correct |
5 | Correct | 1 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 512 KB | Output is correct |
2 | Correct | 19 ms | 1280 KB | Output is correct |
3 | Correct | 21 ms | 1200 KB | Output is correct |
4 | Correct | 19 ms | 1280 KB | Output is correct |
5 | Correct | 19 ms | 1280 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 12 ms | 896 KB | Output is correct |
2 | Correct | 75 ms | 3704 KB | Output is correct |
3 | Correct | 85 ms | 3704 KB | Output is correct |
4 | Correct | 79 ms | 3576 KB | Output is correct |
5 | Correct | 79 ms | 3848 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 24 ms | 1408 KB | Output is correct |
2 | Correct | 193 ms | 8328 KB | Output is correct |
3 | Correct | 199 ms | 8056 KB | Output is correct |
4 | Correct | 198 ms | 8184 KB | Output is correct |
5 | Correct | 195 ms | 8184 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 59 ms | 2808 KB | Output is correct |
2 | Correct | 290 ms | 12172 KB | Output is correct |
3 | Correct | 294 ms | 11768 KB | Output is correct |
4 | Correct | 289 ms | 11768 KB | Output is correct |
5 | Correct | 280 ms | 12024 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 168 ms | 7420 KB | Output is correct |
2 | Correct | 366 ms | 14712 KB | Output is correct |
3 | Correct | 339 ms | 14328 KB | Output is correct |
4 | Correct | 341 ms | 14456 KB | Output is correct |
5 | Correct | 353 ms | 14728 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 308 ms | 13176 KB | Output is correct |
2 | Correct | 455 ms | 19576 KB | Output is correct |
3 | Correct | 467 ms | 19320 KB | Output is correct |
4 | Correct | 464 ms | 19320 KB | Output is correct |
5 | Correct | 481 ms | 19320 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 412 ms | 17288 KB | Output is correct |
2 | Correct | 559 ms | 23160 KB | Output is correct |
3 | Correct | 534 ms | 22776 KB | Output is correct |
4 | Correct | 552 ms | 23160 KB | Output is correct |
5 | Correct | 572 ms | 22820 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 505 ms | 20472 KB | Output is correct |
2 | Correct | 674 ms | 27004 KB | Output is correct |
3 | Correct | 645 ms | 26616 KB | Output is correct |
4 | Correct | 648 ms | 26744 KB | Output is correct |
5 | Correct | 634 ms | 26760 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 589 ms | 23736 KB | Output is correct |
2 | Correct | 730 ms | 31256 KB | Output is correct |
3 | Correct | 736 ms | 30712 KB | Output is correct |
4 | Correct | 751 ms | 30840 KB | Output is correct |
5 | Correct | 731 ms | 30840 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 708 ms | 29420 KB | Output is correct |
2 | Correct | 1150 ms | 33656 KB | Output is correct |
3 | Correct | 815 ms | 33144 KB | Output is correct |
4 | Correct | 786 ms | 33132 KB | Output is correct |
5 | Correct | 846 ms | 33064 KB | Output is correct |