제출 #640562

#제출 시각아이디문제언어결과실행 시간메모리
640562ymm곤돌라 (IOI14_gondola)C++17
10 / 100
12 ms1108 KiB
#include "gondola.h"
#include <bits/stdc++.h>
#define Loop(x,l,r) for (ll x = (l); x < (r); ++x)
#define LoopR(x,l,r) for (ll x = (r)-1; x >= (l); --x)
typedef long long ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll , ll > pll;
using namespace std;

int valid(int n, int inputSeq[])
{
	bool flg = 0;
	int off;
	Loop (i,0,n) {
		if (inputSeq[i] <= n) {
			if (flg && (inputSeq[i]-1 - i + n) % n != off)
				return 0;
			if (!flg) {
				flg = 1;
				off = (inputSeq[i]-1 - i + n) % n;
			}
		}
	}
	return 1;
}

//----------------------

int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
  return -2;
}

//----------------------

int countReplacement(int n, int inputSeq[])
{
  return -3;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...