Submission #1029878

# Submission time Handle Problem Language Result Execution time Memory
1029878 2024-07-21T13:06:07 Z lucri Magic Show (APIO24_show) C++17
Compilation error
0 ms 0 KB
#include <vector>
#include <utility>
std::vector<std::pair<int,int>> Alice()
{
    std::vector<std::pair<int,int>>v;
    long long x=setN(5000);
    for(int i=2;i<=5000;++i)
        v.push_back({x%(i-1)+1,i});
    return v;
}
#include <vector>
#include <utility>
long long Bob(std::vector<std::pair<int,int>> V)
{
    int n=V.size();
    for(int i=V[n-1].first-1;;i+=V[n-1].second-1)
    {
        std::pair<int,int>q;
        for(int j=0;j<n;++j)
        {
            q=V[j];
            if(j==n-1)
                return i;
            if(i%(V[j].second-1)!=V[j].first-1)
                break;
        }
    }
}

Compilation message

Alice.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Alice.cpp:6:17: error: 'setN' was not declared in this scope
    6 |     long long x=setN(5000);
      |                 ^~~~