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;
string as, bs;
void init(string a, string b) {
as = a;
bs = b;
}
int get_distance(int x, int y) {
int acount = 0, tcount = 0, misplacecount = 0;
for (int i = x; i <= y; ++i) {
acount += as[i] == 'A';
tcount += bs[i] == 'A';
misplacecount += as[i] == 'A' && as[i] != bs[i];
}
if (acount != tcount)
return -1;
return misplacecount;
}
# | 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... |