#include "tickets.h"
#include <bits/stdc++.h>
using namespace std;
#define rep(i,s,e) for (int i = s; i <= e; ++i)
#define rrep(i,s,e) for (int i = s; i >= e; --i)
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define all(a) a.begin(), a.end()
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<ll> vll;
ll find_maximum(int k, vector<vi> x) {
int n = x.size();
int m = x[0].size();
ll ans = 0;
vector<vector<int>> answer(n, vector<int>(m, -1));
rep (i,0,m-1) {
vi one_set;
if (i<k) {
rep (j,0,n-1) {
one_set.pb(x[j][i]);
answer[j][i] = x[j][i];
}
sort(all(one_set));
rep (j,0,n-1) ans += abs(one_set[j]-one_set[n/2]);
}
else rep (j,0,n-1) answer[j][i] = -1;
}
allocate_tickets(answer);
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 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 |
1 ms |
204 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 |
1 ms |
204 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 |
1 ms |
204 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 |
204 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 |
204 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 |
204 KB |
Ticket 0 of color 0 is played on invalid day 500507564 |
2 |
Halted |
0 ms |
0 KB |
- |