답안 #824159

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
824159 2023-08-13T16:04:51 Z Trisanu_Das Parametriziran (COCI19_parametriziran) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
#define N 50000

bitset<N> vis[6][26], a;

int main(){
  ios_base::sync_with_stdio(false); cin.tie(NULL);
  int n, m; cin >> n >> m;
  string s[n];
  for(int i = 0; i < n; i++){
    cin >> s[i];
    for(int j = 0; j < m; j++) {
      if(s[i][j] == '?') for(int k = 0; k < 26; k++) vis[j][k][i] = true;
      else q[j][s[i][j] - 'a'][i] = true;
    }
  }
  for(int i = 0; i < n; i++) a[i] = true;
  long long ans = 0;
  for(int i = 0; i < n; i++){
    a[i] = false;
    bitset<N> curr = a;
    for(int j = 0; j < m; j++) if(s[i][j] != '?') cur &= vis[j][s[i][j] - 'a'];
    ans += cur.count();
  }
  cout << ans << '\n';
}

Compilation message

parametriziran.cpp: In function 'int main()':
parametriziran.cpp:15:12: error: 'q' was not declared in this scope
   15 |       else q[j][s[i][j] - 'a'][i] = true;
      |            ^
parametriziran.cpp:23:51: error: 'cur' was not declared in this scope; did you mean 'curr'?
   23 |     for(int j = 0; j < m; j++) if(s[i][j] != '?') cur &= vis[j][s[i][j] - 'a'];
      |                                                   ^~~
      |                                                   curr
parametriziran.cpp:24:12: error: 'cur' was not declared in this scope; did you mean 'curr'?
   24 |     ans += cur.count();
      |            ^~~
      |            curr