Submission #301642

#TimeUsernameProblemLanguageResultExecution timeMemory
301642maximath_1Carnival Tickets (IOI20_tickets)C++14
11 / 100
2 ms768 KiB
#include "tickets.h" #include <vector> #include <algorithm> using namespace std; long long find_maximum(int k, vector<vector<int>> x) { int n = x.size(); vector<int> cr; for(int i = 0; i < n; i ++) cr.push_back(x[i][0]); sort(cr.begin(), cr.end()); long long ans = 0; for(int i = 0; i < n; i ++) ans += (long long)abs(cr[i] - cr[n / 2]); vector<vector<int> > as; as.resize(n); for(int i = 0; i < n; i ++) as[i].push_back(0); allocate_tickets(as); 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...