# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1078856 | Muhammad_Aneeq | Carnival Tickets (IOI20_tickets) | C++17 | 0 ms | 348 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 <vector>
#include <set>
#include <algorithm>
using namespace std;
void allocate_tickets( vector<vector<int>> _x);
long long find_maximum(int k, vector<vector<int>> d)
{
int n=d.size(),m=d[0].size();
if (m==1)
{
vector<vector<int>>ans=d;
vector<int>f;
for (int i=0;i<n;i++)
{
ans[i][0]=0;
f.push_back(ans[i][0]);
}
allocate_tickets(ans);
sort(begin(f),end(f));
long long z=0;
for (int i=0;i<n;i++)
z+=abs(f[i]-f[n/2]);
return z;
}
if (k==1)
{
pair<int,int>a[n];
for (int i=0;i<n;i++)
a[i].first=d[i][0],a[i].second=d[i].back();
long long ans=0;
}
return 0;
}
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... |