Submission #958758

#TimeUsernameProblemLanguageResultExecution timeMemory
958758djs100201Mechanical Doll (IOI18_doll)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> //#include "doll.h" #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("avx2") #define all(v) v.begin(),v.end() using namespace std; using ll = long long; using P = pair<ll, ll>; using PP = pair<ll, P>; const ll n_ =1e5+100, inf = (ll)2e9 * (ll)1e9 + 7, mod = 1e9+7; ll n, m, tc = 1, a, b, c, d, sum, x, y, z, base, ans, k; ll gcd(ll x,ll y){ if(!y)return x; return gcd(y,x%y); } void create_circuit(int M, std::vector<int> A) { int N = A.size(); std::vector<int> C(M + 1); //subtask_1 for(int i=0;i+1<N;i++)C[A[i]]=A[i+1]; C[0] = A[0]; std::vector<int> X,Y; answer(C, X, Y); }

Compilation message (stderr)

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:26:2: error: 'answer' was not declared in this scope
   26 |  answer(C, X, Y);
      |  ^~~~~~