# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
597016 |
2022-07-15T11:47:07 Z |
DJ035 |
Party (POI11_imp) |
C++17 |
|
407 ms |
28236 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 3333
#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 |
212 KB |
Output is correct |
2 |
Incorrect |
0 ms |
212 KB |
Nie wszystkie wypisane osoby siê znaja |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
328 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
9 ms |
256 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
15 ms |
212 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
41 ms |
312 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
142 ms |
6796 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
192 ms |
12316 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
261 ms |
16296 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
317 ms |
19380 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
376 ms |
22732 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
407 ms |
28236 KB |
Nie wszystkie wypisane osoby siê znaja |
2 |
Halted |
0 ms |
0 KB |
- |