제출 #1122942

#제출 시각아이디문제언어결과실행 시간메모리
1122942blackslexDNA 돌연변이 (IOI21_dna)C++20
21 / 100
26 ms2376 KiB
#include "dna.h" #include<bits/stdc++.h> using namespace std; string s, t; void init(std::string a, std::string b) { s = a; t = b; } int get_distance(int x, int y) { string a = s.substr(x, y - x + 1), b = t.substr(x, y - x + 1); sort(a.begin(), a.end()); sort(b.begin(), b.end()); if (a != b) return -1; int cnt = 0; for (int i = x; i <= y; i++) { if (s[i] != t[i]) cnt++; } return (!cnt ? 0 : --cnt); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...