Submission #1111894

#TimeUsernameProblemLanguageResultExecution timeMemory
1111894epicci23Mechanical Doll (IOI18_doll)C++17
Compilation error
0 ms0 KiB
#include "bits/stdc++.h" #include "doll.h" //#define int long long #define all(v) v.begin() , v.end() #define sz(a) (int)a.size() using namespace std; void create_circuit(int m, vector<int> a){ int n = sz(A); vector<int> c(m+1),x,y; vector<int> adj[m+5]; for(int i=0;i<n;i++){ if(i==0) adj[0].push_back(a[i]); else{ adj[a[i-1]].push_back(a[i]); } } adj[a.back()].push_back(0); for(int i=0;i<=m;i++){ if(sz(adj[i])==0) c[i]=i; if(sz(adj[i])==1) c[i]=adj[i][0]; } answer(c, x, y); }

Compilation message (stderr)

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:9:14: error: 'A' was not declared in this scope
    9 |   int n = sz(A);
      |              ^
doll.cpp:5:20: note: in definition of macro 'sz'
    5 | #define sz(a) (int)a.size()
      |                    ^