Submission #902774

# Submission time Handle Problem Language Result Execution time Memory
902774 2024-01-11T02:35:23 Z Sir_Ahmed_Imran Gondola (IOI14_gondola) C++17
20 / 100
11 ms 2908 KB
                              ///~~~LOTA~~~///
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define ff first
#define ss second
#define ll long long 
#define append push_back
#define pii pair<int,int>
#define all(x) (x).begin(),(x).end()
#define MAXN 250001
int vis[MAXN];
int valid(int n, int a[]){
    for(int i=0;i<n;i++){
        if(a[i]>n) continue;
        vis[a[i]]=1;
        for(int j=i+1;j<i+n;j++){
            if(vis[a[j%n]]) return 0;
            vis[a[j%n]]=1;
            if(a[j%n]>n) continue;
            if(a[j%n]!=1+((a[i]+j-i-1)%n)) return 0;
        }
        return 1;
    }
    for(int i=0;i<n;i++){
        if(vis[a[i]]) return 0;
        vis[a[i]]=1;
    }
    return 1;
}
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 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2392 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2404 KB Output is correct
2 Correct 0 ms 2396 KB Output is correct
3 Correct 0 ms 2396 KB Output is correct
4 Correct 0 ms 2396 KB Output is correct
5 Correct 0 ms 2396 KB Output is correct
6 Correct 3 ms 2408 KB Output is correct
7 Correct 8 ms 2408 KB Output is correct
8 Correct 6 ms 2664 KB Output is correct
9 Correct 4 ms 2408 KB Output is correct
10 Correct 11 ms 2664 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2408 KB Output is correct
2 Correct 1 ms 2408 KB Output is correct
3 Correct 0 ms 2408 KB Output is correct
4 Correct 1 ms 2408 KB Output is correct
5 Correct 0 ms 2408 KB Output is correct
6 Correct 4 ms 2408 KB Output is correct
7 Correct 11 ms 2408 KB Output is correct
8 Correct 6 ms 2604 KB Output is correct
9 Correct 4 ms 2404 KB Output is correct
10 Correct 7 ms 2664 KB Output is correct
11 Correct 0 ms 2408 KB Output is correct
12 Correct 1 ms 2408 KB Output is correct
13 Correct 3 ms 2408 KB Output is correct
14 Correct 1 ms 2392 KB Output is correct
15 Correct 7 ms 2908 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2392 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2392 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2392 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -