Submission #930841

# Submission time Handle Problem Language Result Execution time Memory
930841 2024-02-20T13:36:55 Z vjudge1 Party (POI11_imp) C++17
9 / 100
817 ms 50192 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] = {};
    for(int i = 1; i <= n; i++){
        con[i][i] = 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 = 1; j <= n; j++){
            if(del[j] || con[i][j]) continue;
            del[i] = del[j] = 1;
            break;
        }
    }
    for(int i = 1; i <= n; i++){
        if(del[i]) continue;
        cout << i << ' ';
    }
    return 0;
}
// by me
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 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 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 604 KB Output is correct
2 Incorrect 10 ms 2140 KB Wypisano za du¿o osób
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 6 ms 1472 KB Output is correct
2 Incorrect 41 ms 5972 KB Wypisano za du¿o osób
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 13 ms 2396 KB Output is correct
2 Incorrect 114 ms 13136 KB Wypisano za du¿o osób
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 31 ms 5212 KB Output is correct
2 Incorrect 180 ms 19028 KB Wypisano za du¿o osób
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 98 ms 12884 KB Output is correct
2 Incorrect 290 ms 23444 KB Wypisano za du¿o osób
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 251 ms 22524 KB Output is correct
2 Incorrect 378 ms 30548 KB Wypisano za du¿o osób
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 354 ms 29520 KB Output is correct
2 Incorrect 514 ms 36420 KB Wypisano za du¿o osób
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 468 ms 32148 KB Output is correct
2 Incorrect 613 ms 42304 KB Wypisano za du¿o osób
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 522 ms 40664 KB Output is correct
2 Incorrect 765 ms 46188 KB Wypisano za du¿o osób
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 741 ms 50192 KB Output is correct
2 Incorrect 817 ms 48072 KB Wypisano za du¿o osób
3 Halted 0 ms 0 KB -