Submission #986495

#TimeUsernameProblemLanguageResultExecution timeMemory
986495gs25Carnival Tickets (IOI20_tickets)C++17
0 / 100
1 ms348 KiB
#include "tickets.h" #include "assert.h" #include <bits/stdc++.h> using namespace std; long long find_maximum(int k, std::vector<std::vector<int>> x) { int n = x.size(); int m = x[0].size(); assert(m==1); assert(k==1); std::vector<std::vector<int>> answer; vector<int> fuck; for(int i=0; i<n; i++) fuck.push_back(x[i][0]); sort(fuck.begin(),fuck.end()); int ans = 0; for(int i=0; i<n; i++) ans = ans + (i<n/2 ? -fuck[i] : fuck[i]); for (int i = 0; i < n; i++) { std::vector<int> row(m,0); /* for (int j = 0; j < m; j++) { if (j < k) { row[j] = j; } else { row[j] = -1; } } */ answer.push_back(row); } allocate_tickets(answer); 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...