# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
930853 |
2024-02-20T13:51:21 Z |
vjudge1 |
Party (POI11_imp) |
C++17 |
|
729 ms |
65536 KB |
#include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define pii pair<int,int>
#define vint vector<int>
#define vpii vector<pii>
#define pb push_back
#define se second
#define fi first
#define all(x) x.begin(), x.end()
#define graph vector<vint>
using namespace std;
const int N = (int)3000 + 69;
const int mod = 9999991;
const int naser = 3999, has_7 = 3662;
int INF = LLONG_MAX;
int power(int a, int bb) { int ans = 1;while (bb) { if (bb % 2) { ans *= a; }a *= a;bb /= 2; }return ans; }
int gcd(int a, int b) { if (b == 0)return a;return gcd(b, a % b); }
int edge[N][N];
int32_t main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n, m;
cin >> n >> m;
set<int> ans;
for (int i = 1; i <= n; i++)
ans.insert(i);
for (int i = 0; i < m; i++) {
int u, v;
cin >> u >> v;
edge[u][v] = 1;
edge[v][u] = 1;
}
for (int i = 1; i <= n; i++) {
if (ans.count(i))
for (int j = i + 1; j <= n; j++) {
if (!edge[i][j] && ans.count(j)) {
ans.erase(i);
ans.erase(j);
}
}
}
int cnt = 0;
for (int i : ans) {
cout << i << ' ';
if (++cnt == n / 3)
break;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2516 KB |
Output is correct |
3 |
Correct |
2 ms |
4444 KB |
Output is correct |
4 |
Correct |
2 ms |
4444 KB |
Output is correct |
5 |
Correct |
1 ms |
4620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
6748 KB |
Output is correct |
2 |
Incorrect |
13 ms |
13400 KB |
Wypisano za ma³o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
11100 KB |
Output is correct |
2 |
Incorrect |
48 ms |
26984 KB |
Wypisano za ma³o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
15452 KB |
Output is correct |
2 |
Incorrect |
157 ms |
41656 KB |
Wypisano za ma³o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
34 ms |
24660 KB |
Wypisano za ma³o osób |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
170 ms |
41296 KB |
Wypisano za ma³o osób |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
377 ms |
54100 KB |
Output is correct |
2 |
Incorrect |
557 ms |
64340 KB |
Wypisano za ma³o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
535 ms |
63640 KB |
Output is correct |
2 |
Incorrect |
729 ms |
65536 KB |
Wypisano za ma³o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
603 ms |
65536 KB |
Wypisano za ma³o osób |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
28 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
20 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |