Submission #657653

#TimeUsernameProblemLanguageResultExecution timeMemory
657653MilosMilutinovicGenetics (BOI18_genetics)C++14
Compilation error
0 ms0 KiB
/** * author: wxhtzdy * created: 10.11.2022 15:59:08 **/ #include <bits/stdc++.h> using namespace std; string c = "ACGT"; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m, k; cin >> n >> m >> k; vector<string> s(n); for (int i = 0; i < n; i++) { cin >> s[i]; } const int N = 4100; vector<vector<bitset<N>>> f(n, vector<bitset<N>>(4)); for (int i = 0; i < 2; i++) { for (int j = 0; j < n; j++) { for (int k = 0; k < m; k++) { f[j][i][k] = (c[i] == s[j][k] ? 1 : 0); } } } vector<vector<int>> d(n, vector<int>(n)); vector<bool> is(n, true); for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (!is[i] && !is[j]) { continue; } for (int p = 0; p < 2; p++) { d[i][j] += (f[i][p] ^ f[j][p]).count(); if (d[i][j] > k * 2) { is[i] = false; is[j] = false; } } if (d[i][j] != k * 2) { is[i] = false; is[j] = false; } } if (is[i]) { cout << ids[i] + 1 << '\n'; return 0; } } for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (d[i][j] != k * 2) { is[i] = false; is[j] = false; } } } for (int i = 0; i < n; i++) { if (is[i]) { cout << ids[i] + 1 << '\n'; } } return 0; }

Compilation message (stderr)

genetics.cpp: In function 'int main()':
genetics.cpp:49:15: error: 'ids' was not declared in this scope; did you mean 'is'?
   49 |       cout << ids[i] + 1 << '\n';
      |               ^~~
      |               is
genetics.cpp:63:15: error: 'ids' was not declared in this scope; did you mean 'is'?
   63 |       cout << ids[i] + 1 << '\n';
      |               ^~~
      |               is