Submission #307727

#TimeUsernameProblemLanguageResultExecution timeMemory
307727juggernautGondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
#include"gondola.h"
#include<bits/stdc++.h>
#include"grader.cpp"
using namespace std;
int valid(int n,int a[]){
    int i=0,j,need;
    while(i<n&&a[i]>n)i++;
    if(i==n)return 1;
    j=i;
    need=a[i];
    while(j<n){
        if(a[j]>n||a[j]!=need)return 0;
        if(need==n)need=1;
        else need++;
        j++;
    }
    j=0;
    while(j<i){
        if(a[j]>n||a[j]!=need)return 0;
        if(need==n)need=1;
        else need++;
        j++;
    }
    return 1;
}
int replacement(int n,int gondolaSeq[],int replacementSeq[]){
    return -2;
}
int countReplacement(int n,int inputSeq[]){
    return -3;
}

Compilation message (stderr)

/tmp/ccpPqRDT.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccWWYJfv.o:gondola.cpp:(.text.startup+0x0): first defined here
/tmp/ccpPqRDT.o:(.bss+0xf4260): multiple definition of `gondolaSequence'
/tmp/ccWWYJfv.o:(.bss+0xf4260): first defined here
/tmp/ccpPqRDT.o:(.bss+0x0): multiple definition of `replacementSequence'
/tmp/ccWWYJfv.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status