Submission #306486

#TimeUsernameProblemLanguageResultExecution timeMemory
306486giorgikobCarnival Tickets (IOI20_tickets)C++14
Compilation error
0 ms0 KiB
#include "plants.h" #include<bits/stdc++.h> #define ll long long #define ff first #define ss second #define pb push_back using namespace std; vector<int>v; int n; void init(int k, std::vector<int> r) { n = r.size(); if(k == 2){ v = r; } return; } bool check(int x,int y){ for(int i = x; i != y; i--){ if(i == 0) i = n; if(v[i] != 1){ return false; } } return true; } int compare_plants(int x, int y) { if(check((x-1+n)%n,(y-1+n)%n)) return 1; if(check((y-1+n)%n,x)) return -1; return 0; }

Compilation message (stderr)

tickets.cpp:1:10: fatal error: plants.h: No such file or directory
    1 | #include "plants.h"
      |          ^~~~~~~~~~
compilation terminated.