# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
420971 | Monchito | Comparing Plants (IOI20_plants) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <vector>
using namespace std;
int K, N;
vector<int> R;
void init(int k, vector<int> r){
K = k;
R = r;
N = (int)r.size();
}
int compare_plants(int x, int y){
if((x+1)%N == y)
return (R[x] == 1)? -1 : 1;
if((y+1)%N == x)
return (R[y] == 1)? 1 : -1;
return 0;
}
int main(){
// marico el que lo lea
return 0;
}