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;
long long find_maximum(int k, vector<vector<int>> v) {
int n = v.size();
int m = v[0].size();
vector<vector<int>> ans;
vector<int> round;
for(int i=0;i<n;i++){
vector<int> row(m);
for(int j=0;j<m;j++) row[j]=0,round.push_back(v[i][j]);
ans.push_back(row);
}
sort(round.begin(),round.end());
int x=0;
for(int i=0;i<n/2;i++){
x-=round[i];
}
for(int i=n/2;i<n;i++){
x+=round[i];
}
allocate_tickets(ans);
return x;
}
# | 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... |