답안 #930847

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
930847 2024-02-20T13:45:50 Z vjudge1 Party (POI11_imp) C++17
100 / 100
952 ms 61524 KB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define all(x) x.begin(), x.end()
#define INF 0x3f3f3f3f
#define INFLL (ll)0x3f3f3f3f3f3f3f3f
const int MOD = 1e9 + 7, SZ = 1e5 + 10;

int32_t main(){
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int n, m;
    cin >> n >> m;
    int con[n + 1][n + 1] = {};
    int del[n + 1] = {};
    while(m--){
        int u, v;
        cin >> u >> v;
        con[u][v] = con[v][u] = 1;
    }
    for(int i = 1; i <= n; i++){
        if(del[i]) continue;
        for(int j = i + 1; j <= n; j++){
            if(del[j] || con[i][j]) continue;
            del[i] = del[j] = 1;
            break;
        }
    }
    int cnt = 0;
    for(int i = 1; i <= n; i++){
        if(del[i] || cnt >= n / 3) continue;
        cnt++;
        cout << i << ' ';
    }
    return 0;
}
// by me
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 604 KB Output is correct
2 Correct 11 ms 1900 KB Output is correct
3 Correct 10 ms 2136 KB Output is correct
4 Correct 11 ms 2140 KB Output is correct
5 Correct 10 ms 2136 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 1372 KB Output is correct
2 Correct 42 ms 5996 KB Output is correct
3 Correct 41 ms 7252 KB Output is correct
4 Correct 41 ms 7248 KB Output is correct
5 Correct 60 ms 7252 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 2392 KB Output is correct
2 Correct 109 ms 13396 KB Output is correct
3 Correct 107 ms 15956 KB Output is correct
4 Correct 143 ms 16208 KB Output is correct
5 Correct 118 ms 16212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 5208 KB Output is correct
2 Correct 175 ms 19024 KB Output is correct
3 Correct 197 ms 23276 KB Output is correct
4 Correct 242 ms 23616 KB Output is correct
5 Correct 219 ms 23636 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 108 ms 13044 KB Output is correct
2 Correct 312 ms 23664 KB Output is correct
3 Correct 271 ms 28244 KB Output is correct
4 Correct 277 ms 28604 KB Output is correct
5 Correct 289 ms 28632 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 312 ms 23104 KB Output is correct
2 Correct 378 ms 31108 KB Output is correct
3 Correct 422 ms 30292 KB Output is correct
4 Correct 431 ms 30100 KB Output is correct
5 Correct 408 ms 30160 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 373 ms 29884 KB Output is correct
2 Correct 542 ms 36816 KB Output is correct
3 Correct 536 ms 29748 KB Output is correct
4 Correct 491 ms 28244 KB Output is correct
5 Correct 502 ms 28284 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 464 ms 32184 KB Output is correct
2 Correct 647 ms 42584 KB Output is correct
3 Correct 661 ms 51496 KB Output is correct
4 Correct 596 ms 51648 KB Output is correct
5 Correct 646 ms 51632 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 582 ms 40964 KB Output is correct
2 Correct 764 ms 46928 KB Output is correct
3 Correct 852 ms 59344 KB Output is correct
4 Correct 952 ms 59432 KB Output is correct
5 Correct 867 ms 59172 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 758 ms 57948 KB Output is correct
2 Correct 790 ms 55124 KB Output is correct
3 Correct 861 ms 61068 KB Output is correct
4 Correct 796 ms 61524 KB Output is correct
5 Correct 818 ms 61168 KB Output is correct