답안 #230301

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
230301 2020-05-09T13:55:58 Z pere_gil 곤돌라 (IOI14_gondola) C++14
컴파일 오류
0 ms 0 KB
int replacement(n, gondolaSeq, replacementSeq){
return -3;
}
 
int countReplacement(n, inputSeq){
return -3;
}
 
int valid(n, inputSeq){
    int res=1;
    for(int i=0;i<n;i++){
        if( i!=n-1 and inputSeq[i]!=inputSeq[i+1]-1 and inputSeq[i+1]!=1){
            res=0;
        }
    }
    if(inputSeq[0]!=1 and inputSeq[0]-1!=inputSeq[n-1]){
        res=0;
    }
  return res;
}

Compilation message

gondola.cpp:1:17: error: 'n' was not declared in this scope
 int replacement(n, gondolaSeq, replacementSeq){
                 ^
gondola.cpp:1:20: error: 'gondolaSeq' was not declared in this scope
 int replacement(n, gondolaSeq, replacementSeq){
                    ^~~~~~~~~~
gondola.cpp:1:32: error: 'replacementSeq' was not declared in this scope
 int replacement(n, gondolaSeq, replacementSeq){
                                ^~~~~~~~~~~~~~
gondola.cpp:1:32: note: suggested alternative: 'replacement'
 int replacement(n, gondolaSeq, replacementSeq){
                                ^~~~~~~~~~~~~~
                                replacement
gondola.cpp:1:46: error: expression list treated as compound expression in initializer [-fpermissive]
 int replacement(n, gondolaSeq, replacementSeq){
                                              ^
gondola.cpp:5:22: error: 'n' was not declared in this scope
 int countReplacement(n, inputSeq){
                      ^
gondola.cpp:5:25: error: 'inputSeq' was not declared in this scope
 int countReplacement(n, inputSeq){
                         ^~~~~~~~
gondola.cpp:5:33: error: expression list treated as compound expression in initializer [-fpermissive]
 int countReplacement(n, inputSeq){
                                 ^
gondola.cpp:9:11: error: 'n' was not declared in this scope
 int valid(n, inputSeq){
           ^
gondola.cpp:9:14: error: 'inputSeq' was not declared in this scope
 int valid(n, inputSeq){
              ^~~~~~~~
gondola.cpp:9:22: error: expression list treated as compound expression in initializer [-fpermissive]
 int valid(n, inputSeq){
                      ^