답안 #1005485

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1005485 2024-06-22T13:44:15 Z vjudge1 Party (POI11_imp) C++17
100 / 100
322 ms 9304 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;
bool del[3005];
bool 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;
                break;
            }
        }
    }
    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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 604 KB Output is correct
3 Correct 1 ms 2652 KB Output is correct
4 Correct 1 ms 2648 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2648 KB Output is correct
2 Correct 8 ms 2700 KB Output is correct
3 Correct 8 ms 2652 KB Output is correct
4 Correct 8 ms 2652 KB Output is correct
5 Correct 8 ms 2700 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 2652 KB Output is correct
2 Correct 30 ms 4752 KB Output is correct
3 Correct 30 ms 4700 KB Output is correct
4 Correct 41 ms 4956 KB Output is correct
5 Correct 30 ms 4696 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 2652 KB Output is correct
2 Correct 74 ms 6748 KB Output is correct
3 Correct 77 ms 6992 KB Output is correct
4 Correct 74 ms 6744 KB Output is correct
5 Correct 74 ms 6744 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 4696 KB Output is correct
2 Correct 107 ms 6748 KB Output is correct
3 Correct 109 ms 6748 KB Output is correct
4 Correct 143 ms 6748 KB Output is correct
5 Correct 107 ms 6744 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 65 ms 6748 KB Output is correct
2 Correct 133 ms 6748 KB Output is correct
3 Correct 133 ms 6748 KB Output is correct
4 Correct 131 ms 6992 KB Output is correct
5 Correct 132 ms 6776 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 122 ms 6780 KB Output is correct
2 Correct 179 ms 8792 KB Output is correct
3 Correct 209 ms 8792 KB Output is correct
4 Correct 175 ms 8848 KB Output is correct
5 Correct 175 ms 8796 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 160 ms 8832 KB Output is correct
2 Correct 216 ms 8832 KB Output is correct
3 Correct 203 ms 8792 KB Output is correct
4 Correct 207 ms 8796 KB Output is correct
5 Correct 218 ms 8796 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 191 ms 8792 KB Output is correct
2 Correct 244 ms 8796 KB Output is correct
3 Correct 243 ms 8828 KB Output is correct
4 Correct 254 ms 8792 KB Output is correct
5 Correct 282 ms 8828 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 222 ms 8792 KB Output is correct
2 Correct 290 ms 8792 KB Output is correct
3 Correct 286 ms 8964 KB Output is correct
4 Correct 287 ms 8792 KB Output is correct
5 Correct 295 ms 9048 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 310 ms 9052 KB Output is correct
2 Correct 306 ms 9052 KB Output is correct
3 Correct 318 ms 9284 KB Output is correct
4 Correct 322 ms 9304 KB Output is correct
5 Correct 275 ms 9304 KB Output is correct