# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
98493 | pamaj | Kronican (COCI16_kronican) | C++14 | 1358 ms | 4600 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;
const int maxn = 20;
#pragma GCC optimize ("Ofast")
int n, k;
int c[maxn][maxn];
int dp[1 << 20];
int32_t main()
{
ios::sync_with_stdio(false), cin.tie(nullptr);
cin >> n >> k;
for(int i = 0; i < n; i++)
{
for(int j = 0; j < n; j++)
cin >> c[i][j];
}
for(int mask = 0; mask < (1 << n); mask++)
{
if(__builtin_popcount(mask) <= k) {dp[mask] = 0; continue;}
int ans = 1e7;
for(int i = 0; i < n; i++)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |