Submission #867706

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8677062023-10-29 09:37:46_uros9Mutating DNA (IOI21_dna)C++17
100 / 100
39 ms8892 KiB
#include "dna.h"
#include<bits/stdc++.h>
using namespace std;
string a,b;
int n;
vector<int> pa1,pa2,pc1,pc2,pt1,pt2,AC,CA,AT,TA,CT,TC;
void init(std::string aa, std::string bb) {
a=aa;b=bb;
n=a.size();
pa1.resize(n+1,0);pa2.resize(n+1,0);
pc1.resize(n+1,0);pc2.resize(n+1,0);
pt1.resize(n+1,0);pt2.resize(n+1,0);
for(int i=0; i<n; i++){
pa1[i+1]=pa1[i];pc1[i+1]=pc1[i];pt1[i+1]=pt1[i];
if(a[i]=='A')
pa1[i+1]++;
if(a[i]=='C')
pc1[i+1]++;
if(a[i]=='T')
pt1[i+1]++;
}
for(int i=0; i<n; i++){
pa2[i+1]=pa2[i];pc2[i+1]=pc2[i];pt2[i+1]=pt2[i];
if(b[i]=='A')
pa2[i+1]++;
if(b[i]=='C')
pc2[i+1]++;
if(b[i]=='T')
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...