#include "tickets.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
long long find_maximum(int k, std::vector<std::vector<int>> x) {
int n = x.size();
int m = x[0].size();
ll me=0;
for (int i = 0; i < n; i++) {
m+=x[i][0];
}
me/=n;
ll bs=10000000000000;
for(int i=me-2; i<me+2; i++)
{
ll st=0;
for (int j = 0; j < n; j++) {
st=abs(x[j][0]-i);
}
bs=min(bs,st);
}
allocate_tickets(x);
return bs;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Ticket 0 of color 0 is played on invalid day 500507564 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Ticket 0 of color 0 is played on invalid day 78791011 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
There is multiple tickets of color 0 on day 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 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 |
0 ms |
212 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 |
0 ms |
212 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 |
212 KB |
Ticket 0 of color 0 is played on invalid day 500507564 |
2 |
Halted |
0 ms |
0 KB |
- |