Submission #230309

#TimeUsernameProblemLanguageResultExecution timeMemory
230309pere_gilGondola (IOI14_gondola)C++14
Compilation error
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 && inputSeq[i]!=inputSeq[i+1]-1 && inputSeq[i+1]!=1){ res=0; } } if(inputSeq[0]!=1 && inputSeq[0]-1!=inputSeq[n-1]){ res=0; } return res; }

Compilation message (stderr)

gondola.cpp: In function 'int valid(int, int)':
gondola.cpp:12:33: error: invalid types 'int[int]' for array subscript
         if( i!=n-1 && inputSeq[i]!=inputSeq[i+1]-1 && inputSeq[i+1]!=1){
                                 ^
gondola.cpp:12:48: error: invalid types 'int[int]' for array subscript
         if( i!=n-1 && inputSeq[i]!=inputSeq[i+1]-1 && inputSeq[i+1]!=1){
                                                ^
gondola.cpp:12:67: error: invalid types 'int[int]' for array subscript
         if( i!=n-1 && inputSeq[i]!=inputSeq[i+1]-1 && inputSeq[i+1]!=1){
                                                                   ^
gondola.cpp:16:18: error: invalid types 'int[int]' for array subscript
     if(inputSeq[0]!=1 && inputSeq[0]-1!=inputSeq[n-1]){
                  ^
gondola.cpp:16:36: error: invalid types 'int[int]' for array subscript
     if(inputSeq[0]!=1 && inputSeq[0]-1!=inputSeq[n-1]){
                                    ^
gondola.cpp:16:53: error: invalid types 'int[int]' for array subscript
     if(inputSeq[0]!=1 && inputSeq[0]-1!=inputSeq[n-1]){
                                                     ^