| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1215586 | Ablabla | Mutating DNA (IOI21_dna) | C++20 | 19 ms | 2604 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) {
x--; y--;
int egy = 0, ket = 0;
for(int i = x; i <= y; i++){
if(a[i] == 'A'){
egy++;
} else{
ket++;
}
if(b[i] == 'A'){
egy--;
} else{
ket--;
}
}
if(egy != 0 || ket != 0){
return -1;
}
int ans = 0;
for(int i = x; i <= y; i++){
if(a[i] != b[i]){
ans++;
}
}
return ans/2;
}
| # | 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... | ||||
