# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
867706 | _uros9 | Mutating DNA (IOI21_dna) | C++17 | 39 ms | 8892 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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')
# | 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... |