# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
431524 | Hazem | Carnival Tickets (IOI20_tickets) | C++14 | 2 ms | 588 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 <vector>
#include <bits/stdc++.h>
#define LL long long
using namespace std;
vector<LL>vec;
vector<vector<int>>vec1;
long long find_maximum(int k, std::vector<std::vector<int>> x) {
int n = x.size();
vec1 = x;
for(int i=0;i<n;i++)
vec.push_back(x[i][0]),vec1[i][0] = 0;
sort(vec.begin(),vec.end());
LL ans = 0;
for(int i=0;i<vec.size();i++)
ans += abs(vec[i]-vec[vec.size()/2]);
allocate_tickets(vec1);
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... |