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 "plants.h"
#include <bits/stdc++.h>
using namespace std;
int K;
int n;
vector<int> b;
void init(int k, std::vector<int> r) {
K=k;
b=r;
n=r.size();
return;
}
int compare_plants(int x, int y) {
if (K!=2) {
return 0;
}
if ((x+1)%n==y) {
if (b[x]==1) {
return -1;
}
return 1;
}
if ((y+1)%n==x) {
if (b[y]==1) {
return 1;
}
return -1;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |