Submission #1021894

#TimeUsernameProblemLanguageResultExecution timeMemory
10218943maraCarnival Tickets (IOI20_tickets)C++17
0 / 100
1 ms348 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()); int 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...