제출 #576050

#제출 시각아이디문제언어결과실행 시간메모리
576050KrisjanisPDNA 돌연변이 (IOI21_dna)C++17
0 / 100
31 ms4368 KiB
#include "dna.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MX_N = 1e5; ll ps[MX_N]; void init(std::string a, std::string b) { ll n = a.size(); for(ll i=0;i<n;i++) { if(a[i]!=b[i]) ps[i] = 1; if(i) ps[i]+=ps[i-1]; } } int get_distance(int x, int y) { ll diff = ps[y]; if(x) diff -= ps[x-1]; return diff-1; }
#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...