| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1204721 | bangan | 식물 비교 (IOI20_plants) | C++20 | 0 ms | 328 KiB |
#include "plants.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 4;
int n, pre[N];
void init(int k, std::vector<int> r) {
assert(k == 2);
n = r.size();
for (int i=1; i<=n; i++) pre[i] = pre[i-1] + r[i-1];
return;
}
int compare_plants(int x, int y) {
if (x>y) swap(x,y);
int t = pre[y] - pre[x];
if (t == y-x) return 1;
else if (t==0) return -1;
else 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... | ||||
