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 <algorithm>
using namespace std;
#define ll long long
#define add push_back
#define all(a) (a).begin(), (a).end()
#define len(a) ((int)(a).size())
long long find_maximum(int k, vector<vector<int>> x) {
vector<vector<int>> answer;
vector<int> v;
answer.resize(len(x));
for(int i = 0; i < len(x); i++){
answer[i].resize(1);
v.add(x[i][0]);
}
sort(all(v));
ll ret = 0;
for(int i = 0; i < len(v); i++){
ret += abs(v[i] - v[len(v) / 2]);
}
// cout << len(answer) << " " << len(answer[0]) << endl;
allocate_tickets(answer);
return ret;
}
# | 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... |