Submission #1021896

#TimeUsernameProblemLanguageResultExecution timeMemory
10218963maraCarnival Tickets (IOI20_tickets)C++17
11 / 100
1 ms860 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; long long find_maximum(int k, vector<vector<int>> v) { int n = v.size(); int m = v[0].size(); vector<vector<int>> ans; vector<int> round; for(int i=0;i<n;i++){ vector<int> row(m); for(int j=0;j<m;j++) row[j]=0,round.push_back(v[i][j]); ans.push_back(row); } sort(round.begin(),round.end()); long long x=0; for(int i=0;i<n/2;i++){ x-=round[i]; } for(int i=n/2;i<n;i++){ x+=round[i]; } allocate_tickets(ans); return x; }
#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...