# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
934355 | AtabayRajabli | Mutating DNA (IOI21_dna) | C++17 | 23 ms | 2832 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>
const int sz = 1e5 + 5;
int p[sz];
void init(std::string a, std::string b)
{
for(int i = 0; i < a.size(); i++)
{
p[i + 1] = p[i] + int(a[i] != b[i]);
}
}
int get_distance(int x, int y) {
x++, y++;
int v = p[y] - p[x - 1];
if(v % 2)return -1;
return v / 2;
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |