| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1339464 | po_rag526 | Parametriziran (COCI19_parametriziran) | C++17 | 139 ms | 1436 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
const int MAXN = 5e4 + 5;
int n, m;
bitset<50000> wh[6][27];
bitset<50000> alls;
bitset<50000> b;
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> n >> m;
for(int i = 0; i < n; i++)
alls[i] = 1;
int ans = 0;
for(int i = 0; i < n; i++)
{
string s;
cin >> s;
b = alls;
for(int j = 0; j < m; j++)
{
if(s[j] == '?')
{
b &= wh[j][0]; // asta e literally tot dar e ok
for(int k = 0; k < 27; k++)
{
wh[j][k][i] = 1;
}
}
else
{
b &= wh[j][s[j] - 'a' + 1];
wh[j][0][i] = 1;
wh[j][s[j] - 'a' + 1][i] = 1;
}
}
// for(int j = 0; j <= n; j++)
// cout << b[j] << ' ';
// cout << '\n';
ans += b.count();
}
cout << ans;
return 0;
}
| # | 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... | ||||
