#include "tickets.h"
#include <bits/stdc++.h>
using namespace std;
long long find_maximum(int k, vector<vector<int>> x) {
int n = x.size();
int m = x[0].size();
vector<vector<int>> answer(1);
if(m == 1) {
vector<int> p = x[0];
sort(p.begin(), p.end());
int median = floor((p[n/2]+p[n/2-1])/2), val = 0;
for (int i = 0; i < n; i++) {
answer[0].push_back(0);
val += abs(median - p[i]);
}
allocate_tickets(answer);
return val;
}
else {
for (int i = 0; i < n; i++) {
vector<int> row(m);
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 1;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 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 |
204 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 |
204 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 |
204 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 |
204 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 |
204 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 |
204 KB |
WA in grader: allocate_tickets called with parameter of wrong size |
2 |
Halted |
0 ms |
0 KB |
- |