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"
#ifdef sunnatov
#include "grader.cpp"
#else
#include "tickets.h"
#endif
using namespace std;
using ll = long long;
long long find_maximum(int k, std::vector<std::vector<int>> arr) {
int n = arr.size();
int m = arr[0].size();
vector<vector<int>> answer(n, vector<int>(m));
vector<int> v(n);
for (int i = 0; i < n; i++) v[i] = arr[i][0];
sort(v.begin(), v.end());
ll ans = 0;
for (int i = 0; i < n; i++) ans += abs(v[i] - v[n / 2]);
allocate_tickets(answer);
return ans;
}
# | 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... |