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 s, t;
void init(string a, string b) {
s = a;
t = b;
return;
}
int get_distance(int x, int y) {
int A, T;
for (int i = x; i <= y; i++) {
if (s[i] != t[i]) {
if (s[i] == 'A') A++;
else if (s[i] == 'T') T++;
}
}
if (A == T) return A;
else return -1;
return 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... |