# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
248715 | Vladikus004 | Kronican (COCI16_kronican) | C++14 | 1059 ms | 8800 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>
#define inf 2e9
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
const int N = 22;
int n, k, a[N][N], dp[(1<<N)];
set <pair <int, int> > ms;
void get_dp(int mask){
for (int i = 0; i < n; i++){
if (!((1<<i) & mask)) continue;
for (int j = 0; j < n; j++){
if ((!((1<<j) & mask)) || i == j) continue;
dp[mask ^ (1<<i)] = min(dp[mask ^ (1<<i)], dp[mask] + a[i][j]);
}
}
}
bool cmp(int x, int y){
return __builtin_popcount(x) > __builtin_popcount(y);
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |