# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
982450 | MarwenElarbi | Roller Coaster Railroad (IOI16_railroad) | C++17 | 273 ms | 524288 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
#define fi first
#define se second
#define ll long long
#define pb push_back
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long plan_roller_coaster(std::vector<int> s, std::vector<int> t) {
int n = (int)s.size();
long long dp[(1<<n)][n];
for (int i = 0; i < (1<<n); ++i)
{
for (int j = 0; j < n; ++j)
{
dp[i][j]=1e18;
}
}
for (int i = 0; i < n; ++i)
{
dp[(1<<i)][i]=0;
}
for (int mask = 1; mask < (1<<n); ++mask)
{
for (int i = 0; i < n; ++i)
{
if((1<<i)&mask){
int submask=mask-(1<<i);
for (int j = 0; j < n; ++j)
# | 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... |