#include <bits/stdc++.h>
#include "tickets.h"
using namespace std;
#define ll long long
ll get(vector<ll> vals) {
int mid = vals.size() / 2;
ll ans = 0;
for (auto x : vals) ans += abs(vals[mid] - x);
return ans;
}
ll find_maximum(int k, vector<vector<int>> x) {
int n = x.size();
int m = x[0].size();
vector<vector<int>> answer;
vector<ll> v;
for (int i = 0; i < n; i++) {
v.push_back({x[i][0]});
answer.push_back({0});
}
allocate_tickets(answer);
return get(v);
}
# | 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... |