답안 #107695

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
107695 2019-04-25T13:28:31 Z FiloSanza 곤돌라 (IOI14_gondola) C++14
10 / 100
43 ms 4864 KB
#include <bits/stdc++.h>
#include "gondola.h"

using namespace std;

int valid(int N, int inputSeq[])
{
    vector<int> v;
    v.reserve(N);
    for(int i=0; i<N; i++) if(inputSeq[i] <= N) 
        v.push_back(inputSeq[i]);
    
    int mini = min_element(v.begin(), v.end()) - v.begin();

    map<int, int> cont;
    for(auto i : v) cont[i]++;

    for(auto i : cont) if(i.second > 1) return 0;

    for(int i=mini+1; i!=mini; i=(i+1)%v.size()){
        if(i == 0 && v.back() >= v.front()) return 0;
        if(v[i] <= v[i-1]) 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 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 3 ms 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 14 ms 2432 KB Output is correct
7 Correct 43 ms 4088 KB Output is correct
8 Correct 28 ms 4224 KB Output is correct
9 Correct 9 ms 1536 KB Output is correct
10 Correct 35 ms 4856 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 17 ms 2432 KB Output is correct
7 Correct 34 ms 4072 KB Output is correct
8 Correct 26 ms 4224 KB Output is correct
9 Correct 10 ms 1536 KB Output is correct
10 Correct 38 ms 4864 KB Output is correct
11 Incorrect 2 ms 384 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 256 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 256 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -