Submission #389154

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3891542021-04-13 18:06:08apostoldaniel854Gondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#define HOME
#ifndef HOME
#include "gondola.h"
#endif // HOME
int valid(int n, int inputSeq[]) {
int mn = 0;
map <int, int> freq;
for (int i = 0; i < n; i++) {
if (inputSeq[i] < inputSeq[mn])
mn = i;
freq[inputSeq[i]]++;
if (freq[inputSeq[i]] > 1) return 0;
}
rotate (inputSeq, inputSeq + mn, inputSeq + n);
int val = inputSeq[0];
for (int i = 0; i < n; i++) {
if (inputSeq[i] <= n) {
if (val != inputSeq[i])
return 0;
}
val++;
}
return 1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

/tmp/cc7DNmzG.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cc2bMgx3.o:gondola.cpp:(.text.startup+0x0): first defined here
/tmp/cc7DNmzG.o:(.bss+0xf4260): multiple definition of `gondolaSequence'
/tmp/cc2bMgx3.o:(.bss+0xf4260): first defined here
/tmp/cc7DNmzG.o:(.bss+0x0): multiple definition of `replacementSequence'
/tmp/cc2bMgx3.o:(.bss+0x0): first defined here
/tmp/cc7DNmzG.o: In function `main':
grader.cpp:(.text.startup+0xb6): undefined reference to `valid'
grader.cpp:(.text.startup+0x108): undefined reference to `countReplacement'
grader.cpp:(.text.startup+0x132): undefined reference to `replacement'
collect2: error: ld returned 1 exit status