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>
using namespace std;
typedef long long ll;
ll find_maximum(int k, vector<vector<int>> x) {
ll n = x.size();
ll m = x[0].size();
vector<vector<int>> ans;
if(m == 1){
vector<ll> num;
for(int i = 0; i < n; ++i){
num.push_back(x[i][0]);
}
sort(num.begin(),num.end());
ll out = 0;
for(int i = 0; i < n/2; ++i){
out-=num[i];
}
for(int i = n/2; i < n; ++i){
out+=num[i];
}
ans.resize(n,vector<int>(1,0));
allocate_tickets(ans);
return out;
}
return 1;
}
# | 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... |