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 a;
string b;
void init(std::string A, std::string B) {
a = A;
b = B;
}
int get_distance(int x, int y) {
int at = 0;
int ta = 0;
for (int i = x; i <= y; i++) {
if (a[i] == 'A' && b[i] == 'T') {
at++;
} else if (a[i] == 'T' && b[i] == 'A') {
ta++;
}
}
if (at != ta) {
return -1;
}
return ta;
}
# | 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... |