# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
743706 | speedyArda | Fun Tour (APIO20_fun) | C++14 | 72 ms | 72140 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 "fun.h"
#include <vector>
#include "bits/stdc++.h"
using namespace std;
const int BIT = 17;
pair<int, vector<int> > dp[(1 << BIT)][BIT];
vector<int> createFunTour(int N, int Q) {
vector<int> ans(N);
for(int i = 0; i < N; i++)
{
dp[(1 << i)][i] = {1e9, {i}};
}
for(int i = 1; i < (1 << N); i++)
{
for(int a = 0; a < BIT; a++)
{
if(dp[i][a].first == 1e9)
continue;
if((1 << a) & i)
{
for(int l = 0; l < BIT; l++) {
if(l == a)
continue;
if((1 << l) & i) {
int hour = hoursRequired(a, l);
if(dp[i ^ (1 << a)][l].first >= hour)
{
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |