# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
194133 | oscarsierra12 | Gondola (IOI14_gondola) | C++14 | 41 ms | 5492 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 ;
int valid(int n, int inputSeq[])
{
int x = min_element ( inputSeq, inputSeq+n ) - inputSeq ;
vector <int> nwSeq ;
set <int> rep ;
for ( int i = x ; i < n ; ++i ) nwSeq.push_back ( inputSeq[i] ), rep.insert ( inputSeq[i] ) ;
for ( int i = 0 ; i < x ; ++i ) nwSeq.push_back ( inputSeq[i] ), rep.insert ( inputSeq[i] ) ;
int mx = 0 ;
int posible = ( rep.size()==n ) ;
for ( int i = 0 ; i < n ; ++i ) {
if ( nwSeq[i] <= n ) {
if ( nwSeq[i] < mx ) posible = 0 ;
mx = nwSeq[i] ;
}
else mx++ ;
}
return posible;
}
//----------------------
int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
return -2;
}
//----------------------
int countReplacement(int n, int inputSeq[])
{
return -3;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |