Submission #767594

# Submission time Handle Problem Language Result Execution time Memory
767594 2023-06-26T22:22:11 Z tigar Gondola (IOI14_gondola) C++14
0 / 100
1 ms 304 KB
#include "gondola.h"
#include <bits/stdc++.h>

using namespace std;
 
int valid(int n, int* inputSeq)
{
    int last=-1, pos=-1;
    for(int i=0; i<n; i++)
    {
        if(inputSeq[i]<=n and last==-1){last=inputSeq[i]; pos=i;}
        else if(inputSeq[i]<=n)
        {
            if((inputSeq[i]-last)%n==(i-pos)%n){last=inputSeq[i]; pos=i;}
            else return 0;
        }
    }
    return 1;
}

int replacement(int n, int* gondolaSeq, int* replacementSeq) 
{
	return 2005;
}

int countReplacement(int n, int* inputSeq) 
{
	return 24;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer 0 violates the range [1, 76]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer 0 violates the range [1, 76]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer 0 violates the range [1, 76]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 304 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -