# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
301167 | Khongor | Carnival Tickets (IOI20_tickets) | C++14 | 864 ms | 51448 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;
vector<vector<int>> ans;
// 1 5
// 10 10
// 8 12
// 12 20
long long find_maximum(int k, std::vector<std::vector<int>> x) {
int n = x.size();
int m = x[0].size();
ans = vector<vector<int>>(n, vector<int>(m, -1));
long long res = 0;
for (int r = 0; r < k; r++) {
vector<int> low(n), high(n);
vector<pair<int, int>> a(n);
for (int i = 0; i < n; i++) {
int mn = -1;
int mx = -1;
for (int j = 0; j < m; j++)
if (ans[i][j] == -1) {
if (mn == -1 || x[i][j] < x[i][mn]) mn = j;
if (mx == -1 || x[i][j] > x[i][mx]) mx = j;
}
low[i] = x[i][mn];
# | 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... |