| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1360963 | cpismayilmmdv985 | DNA 돌연변이 (IOI21_dna) | C++20 | 1596 ms | 2544 KiB |
#include "dna.h"
#include "bits/stdc++.h"
using namespace std;
string A, B;
int N;
void init(string a, string b) {
A = a, B = b, N = (int)A.length();
}
int get_distance(int l, int r) {
string sorta = "", sortb = "";
for (int i = l; i <= r; i++) sorta += A[i], sortb += B[i];
sort(sorta.begin(), sorta.end()), sort(sortb.begin(), sortb.end());
if (sorta != sortb) return -1;
int cnt = 0;
for (int i = l; i <= r; i++) cnt += (A[i] != B[i]);
return (cnt >> 1) + (cnt % 2);
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
