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<bits/stdc++.h>
#define ll long long
#define vi vector<int>
#define vvi vector<vi>
using namespace std;
ll find_maximum(int k, vvi x) {
int n = x.size(), m = x[0].size();
vi arr(n);
for(int i=0;i<n;i++)
arr.push_back(x[i][0]);
sort(arr.begin(), arr.end());
ll ans = 0;
int mid = arr[n / 2];
for(int i=0;i<n;i++)
ans += abs(arr[i] - mid);
vvi alc(n, vi(m, 0));
allocate_tickets(alc);
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... |