Submission #828483

#TimeUsernameProblemLanguageResultExecution timeMemory
828483Minindu206Carnival Tickets (IOI20_tickets)C++14
11 / 100
1 ms724 KiB
#include "tickets.h" #include<bits/stdc++.h> #define ll long long #define vi vector<int> #define vvi vector<vi> using namespace std; ll find_maximum(int k, vvi x) { int n = x.size(), m = x[0].size(); vi arr(n); for(int i=0;i<n;i++) arr[i] = (x[i][0]); sort(arr.begin(), arr.end()); ll ans = 0; int mid = arr[n / 2]; for(int i=0;i<n;i++) ans += abs(arr[i] - mid); vvi alc(n, vi(m, 0)); allocate_tickets(alc); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...