제출 #294233

#제출 시각아이디문제언어결과실행 시간메모리
294233Muhammetali자동 인형 (IOI18_doll)C++11
컴파일 에러
0 ms0 KiB
#include "doll.h" #include <bits/stdc++.h> #define mp make_pair #define f first #define s second #define sz(x) (int)(x).size() #define rsz resize #define ins insert #define ft front() #define bk back() #define pf push_front #define pb push_back #define eb emplace_back #define lb lower_bound #define ub upper_bound using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pi; typedef pair<ll,ll> pl; typedef vector<int> vi; typedef vector<bool> vb; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; template<class T>bool tmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} template<class T>bool tmax(T& a,T b){if(a<b){a=b;return 1;}return 0;} void create_circuit(int M, std::vector<int> A) { vector<int> C,X,Y; REP(i,M+1)C.pb(0); for (int i=0;i<sz(A)-1;i++) { C[A[i]]=A[i+1]; } answer(C, X, Y); }

컴파일 시 표준 에러 (stderr) 메시지

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:31:6: error: 'i' was not declared in this scope
   31 |  REP(i,M+1)C.pb(0);
      |      ^
doll.cpp:31:2: error: 'REP' was not declared in this scope
   31 |  REP(i,M+1)C.pb(0);
      |  ^~~