Submission #345479

# Submission time Handle Problem Language Result Execution time Memory
345479 2021-01-07T11:56:35 Z maskoff Comparing Plants (IOI20_plants) C++14
0 / 100
1 ms 364 KB
#include "plants.h"
#include<bits/stdc++.h>
using namespace std;

int k;

vector<int> r;

void init(int K, vector<int> v) {
    r = v;
    k = K;
	return;
}

int compare_plants(int x, int y) {
    int mx = 0, mn = 1;
    for (int i = x; i < y; ++i) {
        mn = min(mn, r[i]);
        mx = max(mx, r[i]);
    }
    if (mn == mx) {
        if (mn == 0) {
            return -1;
        } else {
            return 1;
        }
    }
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -