| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 999082 | KasymK | DNA 돌연변이 (IOI21_dna) | C++17 | 1555 ms | 2460 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5+5;
// int a_s[N], c_s[N], t_s[N], a_s2[N], c_s2[N], t_s2[N], diff[N];
string s, s2;
void init(string a, string b){
s = a, s2 = b;
}
int get_distance(int x, int y){
int sm = 0, sm2 = 0, sm3 = 0;
for(int i = x; i <= y; ++i){
if(s[i] == 'A')
sm++;
if(s2[i] == 'A')
sm--;
if(s[i] == 'C')
sm2++;
if(s2[i] == 'C')
sm2--;
if(s[i] == 'T')
sm3++;
if(s2[i] == 'T')
sm3--;
}
if(sm or sm2 or sm3)
return -1;
int answer = 1;
for(int i = x; i <= y; ++i)
answer += (s[i] != s2[i]);
answer /= 2;
return answer;
}| # | 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... | ||||
