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 "tickets.h"
#include <vector>
#include <algorithm>
using namespace std;
long long find_maximum(int k, vector<vector<int>> x) {
int n = x.size();
vector<int> cr;
for(int i = 0; i < n; i ++)
cr.push_back(x[i][0]);
sort(cr.begin(), cr.end());
long long ans = 0;
for(int i = 0; i < n; i ++)
ans += (long long)abs(cr[i] - cr[n / 2]);
vector<vector<int> > as;
as.resize(n);
for(int i = 0; i < n; i ++)
as[i].push_back(0);
allocate_tickets(as);
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... |