답안 #1005531

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1005531 2024-06-22T15:03:02 Z vjudge1 Party (POI11_imp) C++17
100 / 100
880 ms 25424 KB
#include <bits/stdc++.h>
//#include "Allincludes.h"
typedef long long ll;
using namespace std;
#define int long long
bool f[3002][3002];
signed main(){
    int n, m;
    cin >> n >> m;
    while(m--){
        int a, b;
        cin >> a >> b;
        f[a][b] = 1;
        f[b][a] = 1;
    }
    bool ii[n + 1];
    fill(ii, ii + n+1, 0);
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= n; j++){
            if(!ii[i] && !ii[j]){
                if(i != j && f[i][j] == 0){
                    ii[i] = 1;
                    ii[j] = 1;
                }
            }
        }
    }
    vector<int>ans;
    for(int i = 1; i <= n; i++){
         if(!ii[i])
             ans.push_back(i);
    }
    int y = n/3;
    for(int i = 0; i < y; i++){
        cout << ans[i] << " ";
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 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 3 ms 2652 KB Output is correct
2 Correct 22 ms 2668 KB Output is correct
3 Correct 21 ms 2904 KB Output is correct
4 Correct 22 ms 2652 KB Output is correct
5 Correct 22 ms 2652 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 2648 KB Output is correct
2 Correct 94 ms 4700 KB Output is correct
3 Correct 90 ms 4696 KB Output is correct
4 Correct 91 ms 4716 KB Output is correct
5 Correct 82 ms 4696 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 2652 KB Output is correct
2 Correct 204 ms 6768 KB Output is correct
3 Correct 205 ms 6744 KB Output is correct
4 Correct 233 ms 6756 KB Output is correct
5 Correct 212 ms 6992 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 63 ms 4700 KB Output is correct
2 Correct 301 ms 6756 KB Output is correct
3 Correct 311 ms 6748 KB Output is correct
4 Correct 336 ms 6744 KB Output is correct
5 Correct 312 ms 6772 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 189 ms 6748 KB Output is correct
2 Correct 368 ms 6768 KB Output is correct
3 Correct 402 ms 6748 KB Output is correct
4 Correct 371 ms 6744 KB Output is correct
5 Correct 390 ms 6752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 326 ms 7000 KB Output is correct
2 Correct 502 ms 8796 KB Output is correct
3 Correct 507 ms 8792 KB Output is correct
4 Correct 486 ms 8792 KB Output is correct
5 Correct 519 ms 8796 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 405 ms 8796 KB Output is correct
2 Correct 548 ms 20304 KB Output is correct
3 Correct 541 ms 19764 KB Output is correct
4 Correct 628 ms 19948 KB Output is correct
5 Correct 585 ms 19656 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 545 ms 8796 KB Output is correct
2 Correct 747 ms 22096 KB Output is correct
3 Correct 682 ms 21436 KB Output is correct
4 Correct 675 ms 21844 KB Output is correct
5 Correct 659 ms 21592 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 637 ms 18604 KB Output is correct
2 Correct 785 ms 24148 KB Output is correct
3 Correct 731 ms 23632 KB Output is correct
4 Correct 778 ms 23636 KB Output is correct
5 Correct 758 ms 23632 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 774 ms 17276 KB Output is correct
2 Correct 880 ms 20308 KB Output is correct
3 Correct 830 ms 25424 KB Output is correct
4 Correct 806 ms 25276 KB Output is correct
5 Correct 800 ms 25172 KB Output is correct