# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
930846 |
2024-02-20T13:45:07 Z |
vjudge1 |
Party (POI11_imp) |
C++17 |
|
962 ms |
53672 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 / 2) continue;
cnt++;
cout << i << ' ';
}
return 0;
}
// by me
# |
Verdict |
Execution time |
Memory |
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 |
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 |
14 ms |
2000 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
1372 KB |
Output is correct |
2 |
Incorrect |
43 ms |
6992 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
2396 KB |
Output is correct |
2 |
Incorrect |
120 ms |
15404 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
37 ms |
4948 KB |
Output is correct |
2 |
Incorrect |
219 ms |
22184 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
105 ms |
12880 KB |
Output is correct |
2 |
Incorrect |
265 ms |
27416 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
224 ms |
23120 KB |
Output is correct |
2 |
Incorrect |
406 ms |
36040 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
372 ms |
30168 KB |
Output is correct |
2 |
Incorrect |
552 ms |
42256 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
479 ms |
31744 KB |
Output is correct |
2 |
Incorrect |
709 ms |
49120 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
592 ms |
41304 KB |
Output is correct |
2 |
Incorrect |
883 ms |
53672 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
868 ms |
51200 KB |
Output is correct |
2 |
Incorrect |
962 ms |
48224 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |