# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
600524 | Marceantasy | Gondola (IOI14_gondola) | C++17 | 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 <bits/stdc++.h>
using namespace std;
#define ll long long
#define ar array
const int mxN = 1e5+5;
int valid(int n, int inputSeq[]){
int cnt = 0;
for(int i = 1; i<n; ++i){
cnt += (inputSeq[i]<inputSeq[i-1]);
}
return cnt <= 1;
}
int replacement(int n, int gondolaSeq[], int replacementSeq[]);
int countReplacement(int n, int inputSeq[]);