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>
#include "dna.h"
using namespace std;
#define N 100005
vector<int> a(N),b(N),c(N),d(N),e(N),f(N);
void init(string a, string b){
int n=a.size();
for(int i=0;i<n;i++){
if(a[i]=='A' && b[i]=='T') b[i+1]=b[i]+1;
else if(a[i]=='T' && b[i]=='A') e[i+1]=e[i]+1;
}
}
int get_distance(int x, int y){
y++;
int B=b[y]-b[x];
int E=e[y]-e[x];
if (E!=B)
return -1;
return E;
}
# | 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... |