# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
771635 | khshg | Carnival Tickets (IOI20_tickets) | C++14 | 1 ms | 596 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) {
int N = x.size();
int M = x[0].size();
vector<vector<int>> ans(N, vector<int>(1, 0));
allocate_tickets(ans);
vector<int> s(N);
for(int i = 0; i < N; ++i) {
s[i] = x[i][0];
}
sort(begin(s), end(s));
long long D = 0;
for(int i = 0; i < N; ++i) {
D += abs(s[i] - s[N / 2]);
}
return D;
}
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... |