| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1339495 | vjudge1 | Parametriziran (COCI19_parametriziran) | C++20 | 241 ms | 2980 KiB |
#include <bits/stdc++.h>
using namespace std;
const int N = 50005, M = 6;
bitset<N> bts[M][27], full, bt;
string sus[N];
int main() {
int n, m;
cin >> n >> m;
for (int i = 0; i < n; i ++) {
string s;
cin >> s;
for (int j = 0; j < m; j ++) {
if (s[j] == '?') {
bts[j][26][i] = 1;
} else {
bts[j][s[j] - 'a'][i] = 1;
}
}
full[i] = 1;
sus[i] = s;
}
long long ans = 0;
for (int i = 0; i < n; i ++) {
bt = full;
for (int j = 0; j < m; j ++) {
if (sus[i][j] != '?') {
bt &= bts[j][sus[i][j] - 'a'] | bts[j][26];
}
}
ans += bt.count();
}
cout << (ans - n) / 2 << '\n';
}
| # | 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... | ||||
