# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
930839 |
2024-02-20T13:32:44 Z |
vjudge1 |
Party (POI11_imp) |
C++17 |
|
497 ms |
55480 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 N = n;
vector<vector<int>> vtx(n + 1);
int A[n + 1] = {};
while(m--){
int u, v;
cin >> u >> v;
vtx[u].push_back(v);
vtx[v].push_back(u);
}
for(int i = 1; i <= n; i++){
if(A[i]) continue;
int con[n + 1] = {};
con[i] = 1;
for(int v : vtx[i]){
con[v] = 1;
}
for(int j = 1; j <= n; j++){
if(A[j] || con[j]) continue;
A[i] = A[j] = 1;
break;
}
}
for(int i = 1; i <= n; i++){
if(A[i] && N > n / 3){
// N--;
continue;
}
cout << i << ' ';
}
return 0;
}
// by me
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
464 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 |
424 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
604 KB |
Output is correct |
2 |
Incorrect |
14 ms |
1884 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
1628 KB |
Output is correct |
2 |
Incorrect |
41 ms |
6480 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
2228 KB |
Output is correct |
2 |
Incorrect |
101 ms |
15184 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
5208 KB |
Output is correct |
2 |
Incorrect |
160 ms |
21880 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
93 ms |
15560 KB |
Output is correct |
2 |
Incorrect |
205 ms |
25160 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
194 ms |
21620 KB |
Output is correct |
2 |
Incorrect |
274 ms |
30088 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
234 ms |
26192 KB |
Output is correct |
2 |
Incorrect |
326 ms |
44624 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
274 ms |
25684 KB |
Output is correct |
2 |
Incorrect |
384 ms |
49640 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
357 ms |
47456 KB |
Output is correct |
2 |
Incorrect |
482 ms |
53072 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
456 ms |
55480 KB |
Output is correct |
2 |
Incorrect |
497 ms |
53816 KB |
Wypisano za du¿o osób |
3 |
Halted |
0 ms |
0 KB |
- |