#include <bits/stdc++.h>
#include "dna.h"
//#include "grader.cpp"
using namespace std;
string a, b;
void init(string A, string B)
{
a = A;
b = B;
}
bool validate(int x, int y)
{
string s1, s2;
for (int i = x; i <= y; i++)
{
s1 += a[i];
s2 += b[i];
}
sort(s1.begin(), s1.end());
sort(s2.begin(), s2.end());
return (s1 == s2);
}
int get_distance(int x, int y)
{
if (!validate(x, y)) return -1;
if (x == y) return 0;
if (y - x == 1)
{
if (a[x] == b[x]) return 0;
else return 1;
}
int br = 0;
if (a[x] != b[x]) br++;
if (a[x + 1] != b[x + 1]) br++;
if (a[x + 2] != b[x + 2]) br++;
return br - 1;
}
/*
6 3
ATACAT
ACTATA
1 3
4 5
3 5
2
1
-1
*/