제출 #230300

#제출 시각아이디문제언어결과실행 시간메모리
230300pere_gil곤돌라 (IOI14_gondola)C++14
컴파일 에러
0 ms0 KiB
int replacement(int n, int gondolaSeq, int replacementSeq){ return -3; } int countReplacement(int n, int inputSeq){ return -3; } int valid(int n, int 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; }

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

gondola.cpp: In function 'int valid(int, int)':
gondola.cpp:12:34: error: invalid types 'int[int]' for array subscript
         if( i!=n-1 and inputSeq[i]!=inputSeq[i+1]-1 and inputSeq[i+1]!=1){
                                  ^
gondola.cpp:12:49: error: invalid types 'int[int]' for array subscript
         if( i!=n-1 and inputSeq[i]!=inputSeq[i+1]-1 and inputSeq[i+1]!=1){
                                                 ^
gondola.cpp:12:69: error: invalid types 'int[int]' for array subscript
         if( i!=n-1 and inputSeq[i]!=inputSeq[i+1]-1 and inputSeq[i+1]!=1){
                                                                     ^
gondola.cpp:16:18: error: invalid types 'int[int]' for array subscript
     if(inputSeq[0]!=1 and inputSeq[0]-1!=inputSeq[n-1]){
                  ^
gondola.cpp:16:37: error: invalid types 'int[int]' for array subscript
     if(inputSeq[0]!=1 and inputSeq[0]-1!=inputSeq[n-1]){
                                     ^
gondola.cpp:16:54: error: invalid types 'int[int]' for array subscript
     if(inputSeq[0]!=1 and inputSeq[0]-1!=inputSeq[n-1]){
                                                      ^