| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 878170 | vjudge1 | Genetics (BOI18_genetics) | C++17 | 2037 ms | 27600 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;
#define ll long long
#define pb push_back
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx2")
const int N = 4100 + 4;
int n, m, k;
string s[N];
bitset<N << 2> tmp, b[N];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m >> k;
for (int i = 0; i < n; ++i) {
cin >> s[i];
for (int j = 0; j < m; ++j) {
if (s[i][j] == 'A') {
b[i][j] = true;
}
else if (s[i][j] == 'G') {
b[i][j + m] = true;
}
else if (s[i][j] == 'C') {
b[i][j + 2 * m] = true;
}
else if (s[i][j] == 'T') {
b[i][j + 3 * m] = true;
}
}
}
for (int i = 0; i < n; ++i) {
int cntOk = 0;
for (int j = 0; j < n; ++j) {
if (i == j) {
continue;
}
tmp = b[i] ^ b[j];
cntOk += (tmp.count() == (k << 1));
}
if (cntOk == n - 1) {
cout << i + 1;
return 0;
}
}
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... | ||||
