# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
411061 | eagle30 | Carnival Tickets (IOI20_tickets) | C++17 | 2 ms | 716 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 "tickets.h"
#include<bits/stdc++.h>
using namespace std;
long long find_maximum(int k, vector<vector<int> > x) {
long long n = x.size();
long long m = x[0].size();
vector<vector<int> > answer;
answer.assign(n, vector<int>());
vector<long long> vi;
for (long long i = 0; i < n; i++) {
answer[i].push_back(0);
vi.push_back(x[i][0]);
}
sort(vi.begin(), vi.end());
long long hi=vi.size(), tot=0;
hi/=2;
for(long long i=0; i<vi.size(); i++){
tot+=abs(vi[i]-vi[hi]);
}
allocate_tickets(answer);
return tot;
}
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... |