# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
593860 | AlesL0 | Genetics (BOI18_genetics) | C++17 | 247 ms | 3608 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, m, k; cin >> n >> m >> k;
bitset <4100> b[n];
for (int i = 0; i < n; i++){
for (int j = 0; j < m; j++){
char c; cin >> c;
if (c == 'A')b[i].set(j);
}
}
vector <bool> good(n, 1);
for (int i = 0; i < n; i++){
if (!good[i])continue;
bool flag10 = 1;
for (int j = i+1; j < n; j++){
if ((b[i]^b[j]).count() != k){
good[j] = 0; flag10 = 0;
break;
}
}
if (flag10){
cout << i+1;
return 0;
}
}
}
Compilation message (stderr)
# | 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... |