Submission #842749

# Submission time Handle Problem Language Result Execution time Memory
842749 2023-09-03T10:49:41 Z Pacybwoah Gondola (IOI14_gondola) C++17
Compilation error
0 ms 0 KB
#include<algorithm>
#include<vector>
#include<iostream>
#include"game"
using namespace std;

int valid(int n, int inp[])
{
    vector<int> vec;
    for(int i=0;i<n;i++) vec.push_back(inp[i]);
    sort(vec.begin(),vec.end());
    if(unique(vec.begin(),vec.end())-vec.begin()!=n) return 0;
    int first=-1;
    for(int i=0;i<n;i++){
        if(inp[i]<=n){
            first=i;
            break;
        }
    }
    if(first==-1) return 1;
    bool flag=1;
    for(int i=0;i<n;i++){
        if(inp[i]!=(inp[first]+i-first-1+n)%n+1&&inp[i]<=n){
            flag=0;
            break;
        }
    }
    return flag;
}

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

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

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

int countReplacement(int n, int inputSeq[])
{
  return -3;
}

Compilation message

gondola.cpp:4:9: fatal error: game: No such file or directory
    4 | #include"game"
      |         ^~~~~~
compilation terminated.