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;
int const N=1505;
void allocate_tickets( vector<vector<int>> _x);
long long find_maximum(int k, vector<vector<int>> d){
vector<int> all;
int n=d.size();
int m=d[0].size();
vector<vector<int>> x=d;
for(int i=0;i<n;i++)
for(int j=0;j<m;j++)
x[i][j]=-1;
for(int i=0;i<n;i++){
x[i][0]=0;
all.push_back(d[i][0]);
}
allocate_tickets(x);
sort(all.begin(),all.end());
long long ans=0;
for(int i=0;i<n;i++)
ans+=abs(all[n/2]-all[i]);
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... |