Submission #772997

#TimeUsernameProblemLanguageResultExecution timeMemory
772997fve5Carnival Tickets (IOI20_tickets)C++17
11 / 100
1 ms724 KiB
#include <bits/stdc++.h> #include "tickets.h" using namespace std; long long find_maximum(int k, vector<vector<int>> d) { int n = d.size(), m = d[0].size(); vector<vector<int>> ans(n, vector<int>(m, 0)); long long ans_val = 0; vector<int> vals; for (auto x: d) { vals.push_back(x[0]); } sort(vals.begin(), vals.end()); for (auto v: vals) { ans_val += abs(v - vals[n / 2]); } allocate_tickets(ans); return ans_val; }
#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...