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