# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1041992 | 0npata | Mutating DNA (IOI21_dna) | C++17 | 18 ms | 6676 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 "dna.h"
#include<bits/stdc++.h>
using namespace std;
#define vec vector
#define arr array
const int MXN = 100'005;
arr<arr<int, 3>, 3> psum_pref[MXN+1];
void init(std::string a, std::string b) {
map<char, int> chtoid;
chtoid['A'] = 0;
chtoid['C'] = 1;
chtoid['T'] = 2;
int n = a.size();
//cerr << a << '\n';
for(int i = 1; i<=n; i++) {
psum_pref[i] = psum_pref[i-1];
psum_pref[i][chtoid[a[i-1]]][chtoid[b[i-1]]]++;
}
}
int get_distance(int x, int y) {
auto psum_range = psum_pref[y+1];
arr<int, 3> a_cnt;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |