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 <bits/stdc++.h>
using namespace std;
#include "dna.h"
string A, B;
void init(string a, string b) {
A = a;
B = b;
}
int get_distance(int x, int y) {
string a = A.substr(x, (y-x+1));
string b = B.substr(x, (y-x+1));
if (a == b) {
return 0;
}
if (a.size() == 1) {
return -1;
}
if (a.size() == 2) {
if (a[0] == b[1] && a[1] == b[0]) {
return 1;
} else {
return -1;
}
}
// just for now
return a.size();
}
# | 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... |