| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1215597 | Ablabla | DNA 돌연변이 (IOI21_dna) | C++20 | 1593 ms | 2376 KiB |
#include "dna.h"
#include <bits/stdc++.h>
using namespace std;
string a, b;
void init(string A, string B) {
a = A;
b = B;
}
int get_distance(int x, int y) {
int egy = 0, ket = 0, har = 0, negy = 0;
for(int i = x; i <= y; i++){
if(a[i] == 'A'){
egy++;
} else if(a[i] == 'T'){
ket++;
}
if(b[i] == 'A'){
har++;
} else if(b[i] == 'T'){
negy++;
}
}
if(egy != har && ket != negy){
return -1;
}
int ans = 0;
for(int i = x; i <= y; i++){
if(a[i] != b[i]){
ans++;
}
}
ans /= 2;
return ans;
}
| # | 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... | ||||
