Submission #1351361

#TimeUsernameProblemLanguageResultExecution timeMemory
1351361pineapple0006Social Engineering (EGOI22_socialengineering)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

vector<vector<ll>> adj;
vector<bool> visited;

ll findPathCountToCenter(ll v)
{
    visited[v] = true;
    ll res = 0;
    for (ll i : adj[v])
    {
        if (i == 1)
        {
            res++;
        }
        if (visited[i])
        {
            continue;
        }
        res += findPathCountToCenter(i);
    }
    return res;
}

void SocialEngineering(int n, int m, vector<pair<int, int>> edges)
{
    adj.resize(n + 1);
    visited.resize(n + 1, false);
    visited[1] = true;
    for (pair<int, int> p : edges)
    {
        adj[p.first].push_back(p.second);
        adj[p.second].push_back(p.first);
    }
    for (ll i : adj[1])
    {
        if (visited[i])
        {
            continue;
        }
        ll path_count = findPathCountToCenter(i);
        if (path_count % 2 == 1)
        {
            return;
        };
    }
    GetMove();
    return;
}

Compilation message (stderr)

Main.cpp: In function 'void SocialEngineering(int, int, std::vector<std::pair<int, int> >)':
Main.cpp:51:5: error: 'GetMove' was not declared in this scope
   51 |     GetMove();
      |     ^~~~~~~