# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
300208 | Yousef_Salama | Carnival Tickets (IOI20_tickets) | C++17 | 1522 ms | 109716 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;
/*
void allocate_tickets(vector < vector <int> > s){
int n = (int)s.size(), m = (int)s[0].size();
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
if(j > 0)printf(" ");
printf("%d", s[i][j]);
}
printf("\n");
}
}
*/
long long find_maximum(int k, vector < vector <int> > x){
int n = (int)x.size(), m = (int)x[0].size();
long long total = 0;
vector < pair <int, int> > r;
vector <int> t(n, 0);
for(int i = 0; i < n; i++){
for(int j = k - 1; j >= 0; j--){
r.emplace_back(x[i][j] + x[i][m - (k - 1 - j) - 1], i);
total -= x[i][j];
}
}
sort(r.rbegin(), r.rend());
# | 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... |