# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
161406 | 2019-11-02T08:47:02 Z | georgerapeanu | Party (POI11_imp) | C++11 | 1256 ms | 25024 KB |
#include <cstdio> using namespace std; const int NMAX = 3000; int n,m; bool adj[NMAX + 5][NMAX + 5]; bool del[NMAX + 5]; int main(){ scanf("%d %d",&n,&m); for(int i = 1;i <= m;i++){ int x,y; scanf("%d %d",&x,&y); adj[x][y] = true; adj[y][x] = true;; } for(int i = 1;i <= n;i++){ if(del[i] == true){ continue; } for(int j = i + 1;j <= n;j++){ if(del[j] == true){ continue; } if(adj[i][j] == false){ del[i] = del[j] = true; break; } } } for(int i = 1,cnt = 0;i <= n && cnt < n / 3;i++){ if(del[i] == false){ printf("%d ",i); cnt++; } } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 3 ms | 504 KB | Output is correct |
3 | Correct | 3 ms | 632 KB | Output is correct |
4 | Correct | 3 ms | 632 KB | Output is correct |
5 | Correct | 3 ms | 504 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 888 KB | Output is correct |
2 | Correct | 24 ms | 1784 KB | Output is correct |
3 | Correct | 24 ms | 2424 KB | Output is correct |
4 | Correct | 25 ms | 2424 KB | Output is correct |
5 | Correct | 24 ms | 2424 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 15 ms | 1400 KB | Output is correct |
2 | Correct | 191 ms | 3192 KB | Output is correct |
3 | Correct | 95 ms | 6136 KB | Output is correct |
4 | Correct | 96 ms | 6136 KB | Output is correct |
5 | Correct | 91 ms | 6264 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 30 ms | 2040 KB | Output is correct |
2 | Correct | 246 ms | 4728 KB | Output is correct |
3 | Correct | 243 ms | 11772 KB | Output is correct |
4 | Correct | 224 ms | 12024 KB | Output is correct |
5 | Correct | 237 ms | 12152 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 66 ms | 3020 KB | Output is correct |
2 | Correct | 369 ms | 10436 KB | Output is correct |
3 | Correct | 458 ms | 16388 KB | Output is correct |
4 | Correct | 399 ms | 16376 KB | Output is correct |
5 | Correct | 393 ms | 16376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 221 ms | 4856 KB | Output is correct |
2 | Correct | 472 ms | 11008 KB | Output is correct |
3 | Correct | 498 ms | 19576 KB | Output is correct |
4 | Correct | 578 ms | 19644 KB | Output is correct |
5 | Correct | 519 ms | 19644 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 444 ms | 7292 KB | Output is correct |
2 | Correct | 674 ms | 8844 KB | Output is correct |
3 | Correct | 771 ms | 25024 KB | Output is correct |
4 | Correct | 685 ms | 21540 KB | Output is correct |
5 | Correct | 688 ms | 22692 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 635 ms | 9292 KB | Output is correct |
2 | Correct | 813 ms | 8956 KB | Output is correct |
3 | Correct | 858 ms | 11384 KB | Output is correct |
4 | Correct | 828 ms | 11512 KB | Output is correct |
5 | Correct | 818 ms | 11376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 719 ms | 10352 KB | Output is correct |
2 | Correct | 982 ms | 12408 KB | Output is correct |
3 | Correct | 979 ms | 12280 KB | Output is correct |
4 | Correct | 971 ms | 12536 KB | Output is correct |
5 | Correct | 923 ms | 12412 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 851 ms | 9896 KB | Output is correct |
2 | Correct | 1110 ms | 10616 KB | Output is correct |
3 | Correct | 1148 ms | 13368 KB | Output is correct |
4 | Correct | 1114 ms | 13432 KB | Output is correct |
5 | Correct | 1135 ms | 13536 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1102 ms | 11056 KB | Output is correct |
2 | Correct | 1248 ms | 11128 KB | Output is correct |
3 | Correct | 1226 ms | 13560 KB | Output is correct |
4 | Correct | 1240 ms | 13820 KB | Output is correct |
5 | Correct | 1256 ms | 13772 KB | Output is correct |