| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1330528 | SpyrosAliv | Carnival Tickets (IOI20_tickets) | C++20 | 1 ms | 344 KiB |
#include "tickets.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
long long find_maximum(int k, std::vector<std::vector<int>> x) {
int n = x.size();
int m = x[0].size();
vector<vector<int>> cons(n, vector<int>(m, 0));
ll ans1 = 0, ans2 = 0;
ll s = 0, mean1 = 0, mean2 = 0;
for (int i = 0; i < n; i++) {
s += x[i][0];
}
mean1 = s / n, mean2 = s / n + 1;
for (int i = 0; i < n; i++) {
ans1 += abs(x[i][0] - mean1);
ans2 += abs(x[i][0] - mean2);
}
allocate_tickets(cons);
return max(ans1, ans2);
}
| # | 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... | ||||
