제출 #483580

#제출 시각아이디문제언어결과실행 시간메모리
483580ponytail자동 인형 (IOI18_doll)C++17
컴파일 에러
0 ms0 KiB
#include "doll.h" #include <vector> #include <cstdio> #include <cstdlib> #include <bits/stdc++.h> using namespace std; void create_circuit(int M, std::vector<int> A) { vector<int> C(M+1); vector<int> empty; C[0] = A[0]; for(int i=0; i<N-1; i++) { C[A[i]] = A[i+1]; } C[A[N-1]] = 0; answer(C, empty, empty); }

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

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:12:20: error: 'N' was not declared in this scope
   12 |     for(int i=0; i<N-1; i++) {
      |                    ^
doll.cpp:15:9: error: 'N' was not declared in this scope
   15 |     C[A[N-1]] = 0;
      |         ^