답안 #1001726

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1001726 2024-06-19T07:18:24 Z codexistent 곤돌라 (IOI14_gondola) C++14
5 / 100
1 ms 600 KB
#include <iostream>
#include <set>
#include <gondola.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)

int diff(int n, int a, int b){
    if(b >= a) return b - a;
    else return (n - a) + b;
}

int valid(int n, int inputSeq[]){
    pair<int, int> prev = {-1, 0};
    set<int> s;
    FOR(i, 0, n - 1){
        if(inputSeq[i] <= n){
            if(prev.first == -1){
                prev = {i, inputSeq[i]};
            }else{
                if(prev.second + diff(n, prev.first, i) != inputSeq[i]) return 0;
                prev = {i, inputSeq[i]};
            }
        }else{
            if(s.find(inputSeq[i]) != s.end()) return 0;
            s.insert(inputSeq[i]);
        }
    }

    return 1;
}

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

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

/*int main(){
    int t, x;
    cin >> t >> x;
    const int n = x;

    int arr[n];
    FOR(i, 0, n - 1) cin >> arr[i];

    if(t <= 3) valid(x, arr);
    else if(t <= 6) {
        int rep[n];
        replacement(x, arr, rep);
    }else{
        countReplacement(x, arr);
    }
}

*/
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 600 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Integer 0 violates the range [1, 76]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Integer 0 violates the range [1, 76]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Integer 0 violates the range [1, 76]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 512 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Incorrect 1 ms 348 KB Output isn't correct
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 Incorrect 0 ms 348 KB Output isn't correct
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 448 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Incorrect 0 ms 348 KB Output isn't correct
6 Halted 0 ms 0 KB -