Submission #230300

#TimeUsernameProblemLanguageResultExecution timeMemory
230300pere_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 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 (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]){
                                                      ^