Submission #1344086

#TimeUsernameProblemLanguageResultExecution timeMemory
1344086mxhrvsSocial Engineering (EGOI22_socialengineering)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>


using namespace std;

const int MAXN = 200005;
vector<int> adj[MAXN];
int match[MAXN], p[MAXN], base[MAXN], q[MAXN];
bool used[MAXN], blossom[MAXN];

int lca(int a, int b, int n) {
    vector<bool> used_lca(n + 1, false);
    while (true) {
        a = base[a];
        used_lca[a] = true;
        if (match[a] == 0) break;
        a = p[match[a]];
    }
    while (true) {
        b = base[b];
        if (used_lca[b]) return b;
        b = p[match[b]];
    }
}

void SocialEngineering(int n, int m, vector<pair<int, int>> edges) {
    for (auto e : edges) {
        adj[e.first].push_back(e.second);
        adj[e.second].push_back(e.first);
    }

    while (true) {
        int v = GetMove(); 
        if (v == 0) break;
        
        int partner = match[v]; 
        MakeMove(partner);
    }
}

Compilation message (stderr)

Main.cpp: In function 'void SocialEngineering(int, int, std::vector<std::pair<int, int> >)':
Main.cpp:33:17: error: 'GetMove' was not declared in this scope
   33 |         int v = GetMove();
      |                 ^~~~~~~
Main.cpp:37:9: error: 'MakeMove' was not declared in this scope
   37 |         MakeMove(partner);
      |         ^~~~~~~~