# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1005479 |
2024-06-22T13:41:19 Z |
vjudge1 |
Party (POI11_imp) |
C++17 |
|
445 ms |
65536 KB |
#include <bits/stdc++.h>
#define suiii ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define co cout<<
//#pragma GCC optimize("O3,Ofast,unroll-loops")
//#pragma GCC target("avx2,sse3,sse4,avx")
using namespace std;
//stuff
ll n,m;
vector<ll>v[3005];
bool del[3005];
ll mat[3005][3005];
void solve(){
cin>>n>>m;
for(int i=1;i<=m;i++){
ll a,b;
cin>>a>>b;
mat[a][b]=1;
mat[b][a]=1;
}
for(int i=1;i<=n;i++){
if(del[i]) continue;
for(int j=i+1;j<=n;j++){
if(del[j]) continue;
if(mat[i][j]==0){
del[i]=1;
del[j]=1;
}
}
}
ll num=0;
for(int i=1;i<=n;i++){
if(del[i]==0&&num<n/3){
co i<<' ';
num++;
}
}
}
int main()
{
suiii
int t=1;
// cin>>t;
while(t--){
solve();
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
1 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
6492 KB |
Output is correct |
2 |
Incorrect |
9 ms |
12892 KB |
Wypisano za ma³o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
10844 KB |
Output is correct |
2 |
Incorrect |
32 ms |
25176 KB |
Wypisano za ma³o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
14964 KB |
Output is correct |
2 |
Incorrect |
78 ms |
37468 KB |
Wypisano za ma³o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
24 ms |
23172 KB |
Wypisano za ma³o osób |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
73 ms |
37464 KB |
Wypisano za ma³o osób |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
150 ms |
47704 KB |
Output is correct |
2 |
Incorrect |
322 ms |
56072 KB |
Wypisano za ma³o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
280 ms |
55900 KB |
Output is correct |
2 |
Incorrect |
394 ms |
59992 KB |
Wypisano za ma³o osób |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
342 ms |
59996 KB |
Wypisano za ma³o osób |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
445 ms |
64092 KB |
Output is correct |
2 |
Runtime error |
10 ms |
65536 KB |
Execution killed with signal 9 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
10 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |