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<iostream>
#include<vector>
#include<algorithm>
using namespace std;
#define vi vector<int>
#define vvi vector<vi>
vi R;
void init(int k, std::vector<int> r) {
R = r;
}
int compare_plants(int x, int y) {
int a = R[x+1];
for (int i = x+2; i <= y; i++) {
if (R[i] != a) return 0;
}
return (a ? 1 : -1);
}
# | 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... |