Submission #301061

#TimeUsernameProblemLanguageResultExecution timeMemory
301061NucleistCarnival Tickets (IOI20_tickets)C++14
11 / 100
2 ms768 KiB
#include "tickets.h" #include <bits/stdc++.h> #define sz(x) x.size() #define ll long long #define ve vector<ll> #define pb push_back #define all(x) x.begin(),x.end() using namespace std; long long find_maximum(int k,vector<vector<int>> x) { ll n=sz(x); ve cur; for (ll i = 0; i < n; ++i) { cur.pb(x[i][0]); } sort(all(cur)); ll in=cur[n/2]; ll ans=0; for(auto it:cur){ ans+=abs(it-in); } vector<vector<int>>ani; ani.resize(n); for (ll i = 0; i < n; ++i) { ani[i].pb(0); } allocate_tickets(ani); 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...