# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
591386 | SuhaibSawalha1 | Mutating DNA (IOI21_dna) | C++17 | 46 ms | 7420 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;
const int N = 1e5 + 1;
int n, P[N][3][3];
int get (char c) {
switch(c) {
case 'A': return 0;
case 'C': return 1;
default: return 2;
}
}
void init(string a, string b) {
n = a.size();
for (int i = 1; i <= n; ++i) {
++P[i][get(a[i - 1])][get(b[i - 1])];
for (int j = 0; j < 3; ++j) {
for (int k = 0; k < 3; ++k) {
P[i][j][k] += P[i - 1][j][k];
}
}
}
}
int get_distance(int x, int y) {
++y;
int ans = 0;
# | 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... |