#include "tickets.h"
#include <bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
#define ll long long
ll find_maximum(int k, std::vector<std::vector<int>> x) {
int n = x.size();
int m = x[0].size();
vector<pii> v;
for(int i = 0; i < n; i++){
v.push_back({x[i][0], i});
}
vector<vector<int>> res;
res.resize(n);
for(int i = 0; i < n; i++) res[i].resize(m);
sort(v.begin(), v.end());
ll ans = 0;
for(pii a : v){
res[a.second].push_back(0);
ans += abs(a.first - v[(n - 1) / 2].first);
}
allocate_tickets(res);
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
WA in grader: allocate_tickets called with parameter of wrong size |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: allocate_tickets called with parameter of wrong size |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: allocate_tickets called with parameter of wrong size |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: allocate_tickets called with parameter of wrong size |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: allocate_tickets called with parameter of wrong size |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: allocate_tickets called with parameter of wrong size |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
WA in grader: allocate_tickets called with parameter of wrong size |
2 |
Halted |
0 ms |
0 KB |
- |