Submission #878239

#TimeUsernameProblemLanguageResultExecution timeMemory
878239vjudge1Genetics (BOI18_genetics)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int,int>; using pll = pair<ll,ll>; #define pb push_back #define F first #define S second //#define mp make_pair #define all(x) x.begin(),x.end() #define file freopen("closing.in", "r", stdin);freopen("closing.out", "w", stdout); #define kill(x) {cout << x << '\n'; return 0;} //#define int ll #pragma GCC optimize("Ofast,unroll-loops") //#pragma GCC target("avx2") const int N = 4e3 + 110, LG = 18, MOD = 1e9+9; const ll inf = 1e12; int n, m, k; string s[N]; bitset<N> b[N], mark; signed main() { ios::sync_with_stdio(0), cin.tie(0); cin >> n >> m >> k; bool l = 0; for(int i = 0; i < n; ++i) { cin >> s[i]; for(int j = 0; j < m; ++j) { if(s[i][j] != 'A' && s[i][j] != 'C') {l = 1; continue;} s[i][j] == 'A' ? b[i][j] = 1 : b[i][j] = 0; } } if(l) { for(int i = 0; i < n; ++i) { int cnt = 0; bool check = 0; for(int j = 0; j < n; ++j) { cnt = 0; for(int kk = 0; kk < m; ++kk) if(s[i][kk] != s[j][kk]) ++cnt; if((cnt > k || cnt < k) && i != j) { check = 1; break; } } if(!check) kill(i+1); } } for(int i = 0; i < n; ++i) { if(!mark[i]) { for(int j = 0; j < m; ++j) { bitset a<N> = b[i] ^ b[j]; int x = a.count(); if(x != k) { mark[i] = mark[j] = 1; break; } } if(!mark[i]) kill(i+1); } } return 0; }

Compilation message (stderr)

genetics.cpp: In function 'int main()':
genetics.cpp:58:25: error: expected initializer before '<' token
   58 |                 bitset a<N> = b[i] ^ b[j];
      |                         ^
genetics.cpp:59:25: error: 'a' was not declared in this scope
   59 |                 int x = a.count();
      |                         ^