# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1078797 | UmairAhmadMirza | Carnival Tickets (IOI20_tickets) | C++17 | 1 ms | 600 KiB |
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 <bits/stdc++.h>
using namespace std;
int const N=1505;
void allocate_tickets( vector<vector<int>> _x);
long long find_maximum(int k, vector<vector<int>> d){
vector<int> all;
int n=d.size();
int m=d[0].size();
vector<vector<int>> x=d;
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
x[i][j]=-1;
for(int i=0;i<n;i++){
x[i][0]=0;
all.push_back(d[i][0]);
}
allocate_tickets(x);
sort(all.begin(),all.end());
long long ans=0;
for(int i=0;i<n;i++)
ans+=abs(all[n/2]-all[i]);
return ans;
}
Compilation message (stderr)
# | 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... |