Submission #230301

#TimeUsernameProblemLanguageResultExecution timeMemory
230301pere_gilGondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
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 (stderr)

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){
                      ^