Submission #308389

#TimeUsernameProblemLanguageResultExecution timeMemory
308389amunduzbaevGondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;
#include "grader.cpp"
const int N=(1e5+5);
int used[N];
int valid(int n, int a[]){
    bool b=0;
    int i;
    
    for(i=0;i<n;i++){
        if(used[a[i]])
            return 0;
        used[a[i]]++;
    }
    
    for(i=0;i<n;i++){
        if(a[i] <= n){
            b=1;
            break;
        }
    }
    if(!b) return 1;
    int t=a[i];
    for(int j=0;j<n;j++){
        if(a[i]<=n){
            if(a[i]!=t) return 0;
        }
        t++;
        i++;
        if(t>n) t=1;
        if(i==n) i=0;
    }
    return 1;
}

//----------------------

int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
  return -2;
}

//----------------------

int countReplacement(int n, int inputSeq[])
{
  return -3;
}

Compilation message (stderr)

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