Submission #1078803

#TimeUsernameProblemLanguageResultExecution timeMemory
1078803UmairAhmadMirzaCarnival Tickets (IOI20_tickets)C++17
11 / 100
1 ms700 KiB
#include <bits/stdc++.h> using namespace std; int const N=1505; void allocate_tickets( vector<vector<int>> _x); long long find_maximum(int k, vector<vector<int>> d){ vector<int> all; int n=d.size(); int m=d[0].size(); vector<vector<int>> x=d; for(int i=0;i<n;i++) for(int j=0;j<m;j++) x[i][j]=-1; for(int i=0;i<n;i++){ x[i][0]=0; all.push_back(d[i][0]); } allocate_tickets(x); sort(all.begin(),all.end()); long long ans=0; for(int i=0;i<n;i++) ans+=abs(all[n/2]-all[i]); 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...