# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
744472 | MODDI | Gondola (IOI14_gondola) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}