Submission #1064529

# Submission time Handle Problem Language Result Execution time Memory
1064529 2024-08-18T14:03:29 Z sunboi Gondola (IOI14_gondola) C++17
0 / 100
1 ms 348 KB

#include <bits/stdc++.h>
#include "gondola.h"
using namespace std;



int valid(int n, int inputSeq[]){
    vector<int> a;
    int mn = 1e9;
    int pos = -1;
    for (int i = 0; i < n; i++){
        if (inputSeq[i] <= n){
            if (inputSeq[i] < mn){
                pos = i;
                mn = inputSeq[i];
            }
        }
    }
    for (int i = pos; i < n; i++){
        a.push_back(inputSeq[i]);
    }
    for (int i = 0; i < pos; i++){
        a.push_back(inputSeq[i]);
    }
    int cnt = a[0];
    bool f = 0;
    for (int i = 0; i < n; i++){
        if (a[i] == cnt || a[i] > n){
            
        }else f = 1;
        cnt++;
    }
    return f;
}


int replacement(int n, int gondolaSeq[], int replacementSeq[]){
    return 0;
}
int countReplacement(int n, int inputSeq[]){
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -