제출 #930844

#제출 시각아이디문제언어결과실행 시간메모리
930844vjudge1무제 (POI11_imp)C++17
0 / 100
713 ms41292 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...