Submission #1073428

#TimeUsernameProblemLanguageResultExecution timeMemory
1073428blushingecchigirlCarnival Tickets (IOI20_tickets)C++17
11 / 100
1 ms604 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back void allocate_tickets( std::vector<std::vector<int>> _x); ll find_maximum(int k, std::vector<std::vector<int>> d) { int n = d.size(); vector<int> v; for(int i = 0; i<n; i++) { v.pb(d[i][0]); d[i][0] = 0; } sort(v.begin(), v.end()); ll maximum = 0; for(int i = 0; i<n; i++) { maximum+=abs(v[i]-v[n/2]); } allocate_tickets(d); return maximum; }
#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...