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>
using namespace std;
#define int long long
int find_maximum(signed k, std::vector<std::vector<signed>> x) {
int m = x.size();
int n = x[0].size();
int res = 0;
assert(m == 1);
vector<signed> vals = x[0];
sort(vals.begin(), vals.end());
int med = vals[n/2];
for (int i: vals) res += abs(i-med);
vector<vector<signed>> cards(m, vector<signed>(n));
for (int i=0; i<n; i++) {
cards[0][0] = 0;
}
allocate_tickets(cards);
return res;
}
# | 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... |