# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
300462 | guangxuan | Carnival Tickets (IOI20_tickets) | C++14 | 857 ms | 70776 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "tickets.h"
#include <bits/stdc++.h>
using namespace std;
long long find_maximum(int k, std::vector<std::vector<int>> x) {
int n = x.size();
int m = x[0].size();
int all_x[n*m];
for (int i = 0; i < n; i++) {
for(int j=0;j<m;j++){
all_x[i*m+j] = x[i][j];
}
}
nth_element(all_x,all_x+n*m/2,all_x+n*m);
int med = all_x[n*m/2];
for (int i = 0; i < n; i++) {
for(int j=0;j<m;j++){
x[i][j] -= med;
//printf("%d ",x[i][j]);
}//puts("");
}
int l[n],r[n];
int neg = 0;
priority_queue<pair<int,int> >pq;
for(int i=0;i<n;i++){
l[i]=k;r[i]=m-1;
for(int j=0;j<k;j++){
if(x[i][j]>0){
l[i]=j;r[i]=m-1-(k-j);
break;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |