# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
585311 | _martynas | Boarding Passes (BOI22_passes) | C++11 | 244 ms | 25528 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 <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
using ll = long long;
const int MXG = 15;
const ll INF = 1e17;
string s;
int n;
vector<ll> A[MXG];
// pref[i][j][k] -> i after j cost from left at k
vector<ll> pref[MXG][MXG];
// suff[i][j][k] -> i after j cost from right at k
vector<ll> suff[MXG][MXG];
ll dp[1 << MXG];
bool visited[1 << MXG];
// Ok but, why is vector.insert(vector.begin(), x) is 100x slower than vector.push_back(x)...
void init()
{
// pref
for(int i = 0; i < MXG; i++) {
for(int j = 0; j < MXG; j++) {
if(i == j || A[i].empty() || A[j].empty()) continue;
int r = 0;
int cost = 0;
for(int k = 0; k < A[i].size(); k++) {
Compilation message (stderr)
# | 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... |