Submission #515925

# Submission time Handle Problem Language Result Execution time Memory
515925 2022-01-20T06:33:46 Z asadasdas Gondola (IOI14_gondola) C++14
10 / 100
9 ms 944 KB
#include <bits/stdc++.h>
#include <gondola.h>

using namespace std;

int valid(int n, int inputseq[])
{
    int index=-1;
    vector<int> real(n);
    for(int i=0; i<n; ++i)
        if(inputseq[i]<=n)
        {
            real[i]=inputseq[i], index=i;
            break;
        }
    if(index==-1)
        return 1;
    int cur=real[index];
    cur=cur==n?1:cur+1;
    for(int j=(index+1)%n; j!=index; j=(j+1)%n,cur=cur==n?1:cur+1)
        if(inputseq[j]<=n && inputseq[j] !=cur)
            return 0;
    return 1;
}

int replacement(int n, int T[], int ans[]) {
            return 0;
}

int countReplacement(int n, int T[]) {
            return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 4 ms 588 KB Output is correct
7 Correct 7 ms 916 KB Output is correct
8 Correct 6 ms 844 KB Output is correct
9 Correct 2 ms 460 KB Output is correct
10 Correct 8 ms 900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 3 ms 588 KB Output is correct
7 Correct 7 ms 944 KB Output is correct
8 Correct 6 ms 844 KB Output is correct
9 Correct 3 ms 460 KB Output is correct
10 Correct 9 ms 844 KB Output is correct
11 Incorrect 0 ms 204 KB Output isn't correct
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -