제출 #285497

#제출 시각아이디문제언어결과실행 시간메모리
285497erd1곤돌라 (IOI14_gondola)C++14
컴파일 에러
0 ms0 KiB
#include "gondola.h" #include<bits/stdc++.h> using namespace std; int valid(int n, int inputSeq[]) { if(find(input, input+n, 1) == input+n)return 0; rotate(input, find(input, input+n, 1), input+n); for(int i = 0; i < n; i++)if(input[i] != i+1)return 0; return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { return -2; } //---------------------- int countReplacement(int n, int inputSeq[]) { return -3; }

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

gondola.cpp: In function 'int valid(int, int*)':
gondola.cpp:6:11: error: 'input' was not declared in this scope
    6 |   if(find(input, input+n, 1) == input+n)return 0;
      |           ^~~~~
gondola.cpp:7:10: error: 'input' was not declared in this scope
    7 |   rotate(input, find(input, input+n, 1), input+n);
      |          ^~~~~