Submission #603645

#TimeUsernameProblemLanguageResultExecution timeMemory
603645HamletPetrosyanCarnival Tickets (IOI20_tickets)C++17
11 / 100
1 ms596 KiB
#include "tickets.h" #include <vector> #include <algorithm> using namespace std; #define ll long long #define add push_back #define all(a) (a).begin(), (a).end() #define len(a) ((int)(a).size()) long long find_maximum(int k, vector<vector<int>> x) { vector<vector<int>> answer; vector<int> v; answer.resize(len(x)); for(int i = 0; i < len(x); i++){ answer[i].resize(1); v.add(x[i][0]); } sort(all(v)); ll ret = 0; for(int i = 0; i < len(v); i++){ ret += abs(v[i] - v[len(v) / 2]); } // cout << len(answer) << " " << len(answer[0]) << endl; allocate_tickets(answer); return ret; }
#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...