This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "tickets.h"
using namespace std;
long long find_maximum(int k, vector<vector<int>> d) {
int n = d.size(), m = d[0].size();
vector<vector<int>> ans(n, vector<int>(m, 0));
long long ans_val = 0;
vector<int> vals;
for (auto x: d) {
vals.push_back(x[0]);
}
sort(vals.begin(), vals.end());
for (auto v: vals) {
ans_val += abs(v - vals[n / 2]);
}
allocate_tickets(ans);
return ans_val;
}
# | 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... |