Submission #744722

# Submission time Handle Problem Language Result Execution time Memory
744722 2023-05-19T04:07:18 Z PixelCat Gondola (IOI14_gondola) C++14
10 / 100
18 ms 2376 KB
#include "gondola.h"
#ifdef NYAOWO
#include "grader.cpp"
#endif

#include <bits/stdc++.h>
#define For(i, a, b) for(int i = a; i <= b; i++)
#define Forr(i, a, b) for(int i = a; i >= b; i--)
#define F first
#define S second
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define sz(x) ((int)x.size())
#define int LL
using namespace std;
using LL = long long;
using pii = pair<int, int>;

const int MAXN = 100010;

int32_t valid(int32_t n, int32_t inputSeq[]) {
    vector<int> owo;
    vector<int> al;
    For(i, 0, n - 1) {
        int x = inputSeq[i];
        if(x <= n) {
            owo.eb(x - i);
        }
        al.eb(x);
    }
    sort(all(al));
    if(unique(all(al)) != al.end()) return 0;
    if(!sz(owo)) return 1;
    vector<pii> v(1, pii(owo[0], 0));
    for(auto &i:owo) {
        if(i == v.back().F) v.back().S++;
        else v.eb(i, 1);
    }
    return sz(v) <= 2;
}

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

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

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

int32_t countReplacement(int32_t n, int32_t inputSeq[]) {
  return -3;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 8 ms 1360 KB Output is correct
7 Correct 15 ms 2376 KB Output is correct
8 Correct 11 ms 2372 KB Output is correct
9 Correct 4 ms 980 KB Output is correct
10 Correct 15 ms 2376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 7 ms 1360 KB Output is correct
7 Correct 18 ms 2336 KB Output is correct
8 Correct 10 ms 2248 KB Output is correct
9 Correct 4 ms 976 KB Output is correct
10 Correct 15 ms 2376 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Incorrect 1 ms 304 KB Output isn't correct
13 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 296 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 224 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -