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>
using namespace std;
#define ll long long
#define pb push_back
void allocate_tickets( std::vector<std::vector<int>> _x);
ll find_maximum(int k, std::vector<std::vector<int>> d) {
int n = d.size();
vector<int> v;
for(int i = 0; i<n; i++) {
v.pb(d[i][0]);
d[i][0] = 0;
}
sort(v.begin(), v.end());
ll maximum = 0;
for(int i = 0; i<n; i++) {
maximum+=abs(v[i]-v[n/2]);
}
allocate_tickets(d);
return maximum;
}
# | 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... |