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 <bits/stdc++.h>
#define sz(x) x.size()
#define ve vector<int>
#define pb push_back
#define all(x) x.begin(),x.end()
using namespace std;
long long find_maximum(int k,vector<vector<int>> x) {
int n=sz(x);
ve cur;
for (int i = 0; i < n; ++i)
{
cur.pb(x[i][0]);
}
sort(all(cur));
int in=cur[n/2];
int ans=0;
for(auto it:cur){
ans+=abs(it-in);
}
vector<ve>ani;
ani.resize(n);
for (int i = 0; i < n; ++i)
{
ani[i].pb(0);
}
allocate_tickets(ani);
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... |