# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
597015 |
2022-07-15T11:46:47 Z |
DJ035 |
Party (POI11_imp) |
C++17 |
|
33 ms |
2356 KB |
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2")
#include <bits/stdc++.h>
#define MEM 1111
#define sanic ios_base::sync_with_stdio(0)
#define x first
#define y second
#define pf push_front
#define pb push_back
#define all(v) v.begin(), v.end()
#define sz size()
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pi;
const ll INF = 2e18;
const ll MOD = 998244353;
ll n,m,k;
pi a[MEM];
signed main(){
sanic; cin.tie(0);
cin >> n >> m;
for(int i=1; i<=n; i++) a[i].y = i;
for(int i=0; i<m; i++){
ll q1,q2;
cin >> q1 >> q2;
a[q1].x++, a[q2].x++;
}
sort(a+1,a+n+1);
ll pos=0;
vector<ll> v;
for(int i=0; i<n/3; i++)
v.pb(a[n-i].y);
sort(all(v));
for(int i=0; i<n/3; i++)
cout << v[i] << ' ';
}
Compilation message
imp.cpp: In function 'int main()':
imp.cpp:31:8: warning: unused variable 'pos' [-Wunused-variable]
31 | ll pos=0;
| ^~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
332 KB |
Output is correct |
2 |
Incorrect |
1 ms |
340 KB |
Nie wszystkie wypisane osoby siê znaja |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
340 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
7 ms |
724 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
14 ms |
1220 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
33 ms |
2356 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
596 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
2 ms |
572 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |