이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gondola.h"
#include <bits/stdc++.h>
//#include "grader.cpp"
using namespace std;
int valid(int n, int a[]){
map<int,int> mp;
for(int i=0;i<n;i++){
if(mp[a[i]]!=0) return 0;
mp[a[i]]=1;
}
vector<pair<int,int>> v;
for(int i=0;i<n;i++){
if(a[i]<=n){
v.push_back({a[i],i});
}
}
sort(v.begin(),v.end());
for(int i=1;i<(int)v.size();i++){
int k=(v[i].first-v[i-1].first);
int s=(v[i].second-v[i-1].second+n)%n;
if(k!=s) return 0;
}
return 1;
}
//----------------------
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... |