Submission #308306

#TimeUsernameProblemLanguageResultExecution timeMemory
308306sofapudenCarnival Tickets (IOI20_tickets)C++14
11 / 100
2 ms768 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; ll find_maximum(int k, vector<vector<int>> x) { ll n = x.size(); ll m = x[0].size(); vector<vector<int>> ans; if(m == 1){ vector<ll> num; for(int i = 0; i < n; ++i){ num.push_back(x[i][0]); } sort(num.begin(),num.end()); ll out = 0; for(int i = 0; i < n/2; ++i){ out-=num[i]; } for(int i = n/2; i < n; ++i){ out+=num[i]; } ans.resize(n,vector<int>(1,0)); allocate_tickets(ans); return out; } return 1; }
#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...