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>> x) {
long long n = x.size();
long long m = x[0].size();
vector<vector<int>> answer (n, vector <int> (m));
long long rs = 0;
vector <int> v;
for (int i = 0; i < n; i++){
v.push_back(x[i][0]);
}
sort(v.begin(), v.end());
for (int i = 0; i < n; i++){
rs+=abs(x[i][0] - v[n / 2]);
}
allocate_tickets(answer);
return rs;
// return min({rs1, rs2, rs3});
}
# | 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... |