Submission #930844

# Submission time Handle Problem Language Result Execution time Memory
930844 2024-02-20T13:42:03 Z vjudge1 Party (POI11_imp) C++17
0 / 100
713 ms 41292 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 = i + 1; j <= n; j++){
            if(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 Incorrect 0 ms 344 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 600 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 1448 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 14 ms 2396 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 30 ms 4932 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 113 ms 13140 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 230 ms 22880 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 382 ms 29688 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 463 ms 32420 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 576 ms 41292 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 713 ms 35848 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -