Submission #102548

# Submission time Handle Problem Language Result Execution time Memory
102548 2019-03-25T21:10:30 Z Leonardo_Paes Gondola (IOI14_gondola) C++11
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;

int valid(int n, int vet[]){

    int x=0;

    bool ok=true;

    for(int i=0; i<n; i++){
        if(vet[i]>n or vet[i+1]>n){
            continue;
        }
        else{
            if(i==n-1){
                if(vet[0]<vet[i]){
                    if(x==0){
                        x=1;
                    }
                    else{
                        ok=false;
                    }
                }
            }
            else if(vet[i+1]<vet[i]){
                if(x==0){
                    x=1;
                }
                else{
                    ok=false;
                }
            }
        }
    }
    return ok;
}

Compilation message

/tmp/ccVsFBUx.o: In function `main':
grader.cpp:(.text.startup+0xc3): undefined reference to `countReplacement'
grader.cpp:(.text.startup+0xe2): undefined reference to `valid'
grader.cpp:(.text.startup+0x106): undefined reference to `replacement'
collect2: error: ld returned 1 exit status