답안 #1042960

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1042960 2024-08-03T15:43:29 Z ALeonidou 곤돌라 (IOI14_gondola) C++17
20 / 100
6 ms 2516 KB
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define  F first
#define S second
#define pb push_back
#define endl "\n"
#define sz(x) (ll)x.size()

typedef vector <ll> vi;
typedef pair <ll,ll> ii;
typedef vector <ii> vii;

#define dbg(x) cout<<#x<<": "<<x<<endl;
#define dbg2(x,y) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;
#define dbg3(x,y,z) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;

void printVct(vi &v){
	for (ll i =0; i<sz(v); i++){
		cout<<v[i]<<" ";
	}
	cout<<endl;
}

int valid(int n, int arr[])
{
    //subtask 1:
    ll p = 0;
    while (p < n && arr[p] != 1) p++;

    // dbg(p);

    vi v;
    for (ll i = p; i<n; i++){
        v.pb(arr[i]);
    }
    for (ll i =0; i<p; i++){
        v.pb(arr[i]);
    }
    // printVct(v);

    for (ll i =1; i<n; i++){
        if (v[i] != v[i-1] + 1){
            return 0;
        }
    }

    //subtask 2:


    return 1;
}

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

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

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

int countReplacement(int n, int inputSeq[])
{
    return -3;
}


/*
1
5
1 2 3 4 5

*/
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 3 ms 1240 KB Output is correct
7 Correct 6 ms 2516 KB Output is correct
8 Correct 4 ms 2192 KB Output is correct
9 Correct 2 ms 860 KB Output is correct
10 Correct 6 ms 2256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 440 KB Output is correct
6 Correct 3 ms 1344 KB Output is correct
7 Correct 6 ms 2296 KB Output is correct
8 Correct 5 ms 2260 KB Output is correct
9 Correct 2 ms 964 KB Output is correct
10 Correct 6 ms 2260 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 356 KB Output is correct
13 Correct 3 ms 1244 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 5 ms 2368 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 352 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 356 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 352 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 356 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -