| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1369469 | aleksandre | Rice Hub (IOI11_ricehub) | C++20 | 0 ms | 344 KiB |
#include<bits/stdc++.h>
#include"ricehub.h"
using namespace std;
int besthub(int R, int L, int X[], long long B) {
for (int i = X[0]; i <= X[L-1]; i++) {
long long cost = 0;
for (int j = 0; j < L; j++) {
cost += abs(X[j] - i);
}
if (cost <= B) {
return i;
}
}
return -1;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
