# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
744472 |
2023-05-18T15:26:30 Z |
MODDI |
Gondola (IOI14_gondola) |
C++14 |
|
0 ms |
0 KB |
#include "gondola.h"
#include "grader.cpp"
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
using namespace std;
int valid(int n, int inputSeq[])
{
return -1;
}
//----------------------
int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
vi initial;
for(int i = 0; i < n; i++)
initial.pb(gondolaSeq[i]);
vi replace;
sort(initial.begin(), initial.end());
int j = 1;
for(int i = 0; i < n; i++){
while(j < initial[i]){
replace.pb(j++);
}
j++;
}
int l = replace.size();
for(int i = 0; i < l; i++)
replacementSeq[i] = replace[i];
return l;
}
//----------------------
int countReplacement(int n, int inputSeq[])
{
return -3;
}
Compilation message
/usr/bin/ld: /tmp/ccCe2szP.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc8JzmXM.o:gondola.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccCe2szP.o:(.bss+0xf4260): multiple definition of `gondolaSequence'; /tmp/cc8JzmXM.o:(.bss+0xf4260): first defined here
/usr/bin/ld: /tmp/ccCe2szP.o:(.bss+0x0): multiple definition of `replacementSequence'; /tmp/cc8JzmXM.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status