| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 443870 | osmanallazov | Mutating DNA (IOI21_dna) | C++17 | 44 ms | 3880 KiB | 
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 q,w,e,r;
void init(std::string a, std::string b) {
    q=a;
    e=a;
    r=b;
    w=b;
}
int get_distance(int x, int y) {
    int b=0,c=0,t=0;
    int B=0,C=0,T=0;
    for(int i=x;i<=y;i++){
		if(q[i]=='A')
        b++;
		if(q[i]=='T')
		c++;
		if(q[i]=='C')
		t++;
		if(w[i]=='A')
		B++;
		if(w[i]=='T')
		C++;
		if(w[i]=='C')
		T++;
	}
	if(b!=B||c!=C||t!=T)
        return -1;
    if(y-x==0)
        return 0;
    if(y-x==1){
        if(q[x]==w[x]){
            return 0;
        }
        else{
            return 1;
        }
    }
    if(y-x==2){
        if(q[x]==w[x] && w[x+1]==w[x+1] && q[y]==w[y]){
        return 0;
        }
		else if(q[x]==w[x] || q[x+1]==w[x+1] || q[y]==w[y]){
		return 1;
		}
		else{
		return 2;
		}
    }
}
Compilation message (stderr)
| # | 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... | ||||
