Submission #1364964

#TimeUsernameProblemLanguageResultExecution timeMemory
1364964biserailievaToy Design (EGOI22_toydesign)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

void ToyDesign(int n, int max_ops)
{
    vector<pair<int,int>> result;

    int current = 0;

    for(int i = 1; i <= n; i++)
    {
        for(int j = i + 1; j <= n; j++)
        {
            int x = Connected(current, i, j);

            if(x != current)
            {
                result.push_back({i, j});
                current = x;
            }
        }
    }

    DescribeDesign(result);
}

Compilation message (stderr)

Main.cpp: In function 'void ToyDesign(int, int)':
Main.cpp:14:21: error: 'Connected' was not declared in this scope
   14 |             int x = Connected(current, i, j);
      |                     ^~~~~~~~~
Main.cpp:24:5: error: 'DescribeDesign' was not declared in this scope
   24 |     DescribeDesign(result);
      |     ^~~~~~~~~~~~~~