Submission #1135686

#TimeUsernameProblemLanguageResultExecution timeMemory
1135686xnqsGenetics (BOI18_genetics)C++20
Compilation error
0 ms0 KiB
#pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("avx2") #include <iostream> #include <fstream> #include <vector> #include <queue> #include <utility> #include <algorithm> #include <bitset> int x, y, tgt; char str[4105][4105]; inline int dist(char* a, char* b) { int ret = 0; for (int i = 0; i < y &&; ++i) { ret += (a[i]==b[i]); } return y - ret; } int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL); std::cin >> x >> y >> tgt; for (int i = 0; i < x; i++) { std::cin >> str[i]; } for (int i = 0; i < x; i++) { bool ok = 1; for (int j = 0; j < x && ok; j++) { if (i==j) { continue; } ok &= (dist(str[i],str[j])==tgt); } if (ok) { std::cout << i+1 << "\n"; break; } } }

Compilation message (stderr)

genetics.cpp: In function 'int dist(char*, char*)':
genetics.cpp:17:33: error: expected primary-expression before ';' token
   17 |         for (int i = 0; i < y &&; ++i) {
      |                                 ^