이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define forn(j, i, n) for(int i = j; i <= n; ++i)
#define FOR(j, i, n) for(int i = j; i < n; ++i)
#define nfor(j, i, n) for(int i = n; i >= j; --i)
#define IOS ios_base::sync_with_stdio(false), cin.tie(), cout.tie();
#define all(v) v.begin(), v.end()
#define pb push_back
const int maxn = 7e3+100;
//#define int ll
#define pii pair <int, int>
int inf = 1e9;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int a[maxn];
int valid(int n, int inputSeq[])
{
forn(1, i, n)
{
a[i] = inputSeq[i-1];
}
vector <int> vec;
forn(1, i, n)
{
if(a[i] > n) continue;
vec.pb(a[i]);
}
if(vec.size() == 0) return 1;
int sz = vec.size();
int mn = -1;
FOR(0, i, sz)
{
vec.pb(vec[i]);
if(mn == -1 || vec[mn] > vec[i]) mn = i;
}
int bad = 0;
FOR(mn + 1, i, mn + sz)
{
if(vec[i] <= vec[i - 1])
{
bad = 1;
}
}
return (!bad);
}
int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
return -2;
}
//----------------------
int countReplacement(int n, int inputSeq[])
{
return -3;
}
# | 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... |