Submission #947025

#TimeUsernameProblemLanguageResultExecution timeMemory
947025AkibAzmainCarnival Tickets (IOI20_tickets)C++17
11 / 100
1 ms696 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; using ll = long long; long long find_maximum(int k, std::vector<std::vector<int>> x) { ll n = x.size(); ll m = x[0].size(); std::vector<std::vector<int>> ans (n, vector < int > (m)); ll sum = 0; if (m == 1) { vector < ll > a; for (auto &y : x) a.push_back (y[0]); sort (a.begin (), a.end ()); for (auto &y : a) sum += abs (y - a[n / 2]); } allocate_tickets(ans); return sum; }
#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...