# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
92602 | luciocf | Vještica (COCI16_vjestica) | C++14 | 545 ms | 2244 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 = 17;
const int inf = 1e9+10;
int dp[1<<maxn], qtd[1<<maxn], n;
int mark[maxn][27], menor[27];
string s[maxn];
void calc(void)
{
for (int mask = 0; mask < (1<<n); mask++)
{
for (int i = 0; i < 26; i++)
menor[i] = inf;
for (int i = 0; i < n; i++)
if (mask&(1<<i))
for (int j = 0; j < 26; j++)
menor[j] = min(menor[j], mark[i][j]);
for (int i = 0; i < 26; i++)
qtd[mask] += menor[i];
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |