답안 #256396

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
256396 2020-08-02T16:11:05 Z PedroBigMan 곤돌라 (IOI14_gondola) C++14
10 / 100
14 ms 2296 KB
#include "gondola.h"
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <queue>
#include <deque>
#include <list>
#include <iomanip>
#include <stdlib.h>
#include <time.h>
#include <cstring>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define REP(i,a,b) for(ll i=(ll) a; i<(ll) b; i++)
#define pb push_back
#define mp make_pair
#define pl pair<ll,ll>
#define ff first
#define ss second
#define whole(x) x.begin(),x.end()
#define DEBUG(i) cout<<"Pedro Is The Master "<<i<<endl
#define INF 500000000LL
#define EPS 0.00000001
#define pi 3.14159
ll mod=99824LL;

int valid(int n, int inputSeq[])
{
    ll N=(ll) n;
    vector<ll> s; REP(i,0,N) {s.pb((ll) inputSeq[i]);}
    REP(i,0,N) {if(s[i]>N) {s[i]=-1;} else {s[i]--;}}
    ll fi=-1;
    REP(i,0,N) {if(s[i]!=-1) {fi=i; break;}}
    if(fi==-1) {return 1;}
    REP(i,0,N)
    {
        if(s[i]==-1) {continue;}
        if(((s[i]-i)-(s[fi]-fi))%N!=0) {return 0;}
    }
    return 1;
 }

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

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

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

int countReplacement(int n, int inputSeq[])
{
  return -3;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 0 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 6 ms 1276 KB Output is correct
7 Correct 13 ms 2296 KB Output is correct
8 Correct 11 ms 2168 KB Output is correct
9 Correct 4 ms 896 KB Output is correct
10 Correct 12 ms 2296 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 6 ms 1276 KB Output is correct
7 Correct 14 ms 2296 KB Output is correct
8 Correct 11 ms 2168 KB Output is correct
9 Correct 4 ms 896 KB Output is correct
10 Correct 12 ms 2296 KB Output is correct
11 Incorrect 0 ms 384 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -