Submission #608744

# Submission time Handle Problem Language Result Execution time Memory
608744 2022-07-27T09:50:25 Z DeMen100ns Monster Game (JOI21_monster) C++17
Compilation error
0 ms 0 KB
/*
Author : DeMen100ns (a.k.a Vo Khac Trieu)
School : VNU-HCM High school for the Gifted
fuck you adhoc
*/

#include <bits/stdc++.h>
#include <monster.h>

using namespace std;

const int N = 1000 + 5;
const long long INF = numeric_limits<long long>::max() / 2;
const int MAXA = 1e9;
const int B = sqrt(N) + 5;

bool f[N][N];
int cnt[N];

vector<int> solve(int n)
{
    for(int i = 0; i < n; ++i){
        for(int j = 1; j < n; ++j){
            f[i][j] = Query(i, j);
            cnt[i] += f[i][j];
            cnt[j] += (!f[i][j]);
        }
    }
    vector <int> ans(N);
    int luu1 = -1, luu2 = -1;
    for(int i = 0; i < n; ++i){
        if (cnt[i] < n - 1){
            ans[i] = cnt[i] - 1;
        } else{
            if (luu1 == -1) luu1 = i;
            else luu2 = i;
        }
    }
    ans[luu1] = ans[luu2] = n - 1;
    if (f[luu1][luu2]) ans[luu1] = n - 2;
    else ans[luu2] = n - 2;

    return ans;
}

Compilation message

/usr/bin/ld: /tmp/ccKSyvIf.o: in function `main':
stub.cpp:(.text.startup+0xb3): undefined reference to `Solve(int)'
collect2: error: ld returned 1 exit status