#include "tickets.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
long long find_maximum(int k, std::vector<std::vector<int>> x) {
ll n = x.size();
ll m = x[0].size();
std::vector<std::vector<int>> ans (n, vector < int > (m));
ll sum = 0;
if (m == 1)
{
vector < ll > a;
for (auto &y : x) a.push_back (y[0]);
sort (a.begin (), a.end ());
for (auto &y : a) sum += abs (y - a[n / 2]);
}
allocate_tickets(ans);
return sum;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
696 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
There is multiple tickets of color 0 on day 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
There is multiple tickets of color 0 on day 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
388 KB |
There is multiple tickets of color 0 on day 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
There is multiple tickets of color 0 on day 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
There is multiple tickets of color 0 on day 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
696 KB |
Output is correct |
7 |
Incorrect |
0 ms |
348 KB |
There is multiple tickets of color 0 on day 0 |
8 |
Halted |
0 ms |
0 KB |
- |