| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1228182 | Ludissey | Comparing Plants (IOI20_plants) | C++20 | 1 ms | 408 KiB |
#include "plants.h"
#include <bits/stdc++.h>
using namespace std;
#define all(a) (a.begin(), a.end())
#define sz(a) (int)a.size()
vector<int> r;
void init(int k, std::vector<int> _r) {
r=_r;
return;
}
int compare_plants(int x, int y) {
if((x+1)%sz(r)==y) {
if(r[x]==1) return -1;
else return 1;
}else if((y+1)%sz(r)==x){
if(r[y]==1) return 1;
else 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... | ||||
