답안 #1033248

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1033248 2024-07-24T15:06:11 Z ender 게임 (IOI14_game) C++17
0 / 100
0 ms 348 KB
#include "game.h"
#include <bits/stdc++.h>

using namespace std;

const int N = 1502;
vector<int> cnt(N, 0);
int actn;

void initialize(int n) {

    actn = n;

    for(int i = 0; i < n; ++i){

        cnt[i]++;

    }

}

int hasEdge(int u, int v) {

    if(cnt[u] == actn-1 || cnt[v] == actn-1){
        cnt[u]++;
        cnt[v]++;
        return 1;
    } else {
        cnt[u]++;
        cnt[v]++;
        return 0;
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Incorrect 0 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Incorrect 0 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Incorrect 0 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -