Submission #285497

#TimeUsernameProblemLanguageResultExecution timeMemory
285497erd1Gondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
#include "gondola.h" #include<bits/stdc++.h> using namespace std; int valid(int n, int inputSeq[]) { if(find(input, input+n, 1) == input+n)return 0; rotate(input, find(input, input+n, 1), input+n); for(int i = 0; i < n; i++)if(input[i] != i+1)return 0; return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { return -2; } //---------------------- int countReplacement(int n, int inputSeq[]) { return -3; }

Compilation message (stderr)

gondola.cpp: In function 'int valid(int, int*)':
gondola.cpp:6:11: error: 'input' was not declared in this scope
    6 |   if(find(input, input+n, 1) == input+n)return 0;
      |           ^~~~~
gondola.cpp:7:10: error: 'input' was not declared in this scope
    7 |   rotate(input, find(input, input+n, 1), input+n);
      |          ^~~~~