# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
676130 | 12332100 | Mutating DNA (IOI21_dna) | C++17 | 44 ms | 13016 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;
typedef long long ll;
string s,ss;
ll dna[2][3][100001],jem[100001],res[100001][6];
map<char,ll>mp;
void init(string s,string ss) {
mp['A']=0;
mp['T']=1;
mp['C']=2;
dna[0][mp[s[0]]][0]=1;
dna[1][mp[ss[0]]][0]=1;
for(int i=1;i<s.size();i++){
if(s[i]==ss[i])jem[i]=jem[i-1]+1;
else jem[i]=jem[i-1];
//
for(int j=0;j<3;j++){
dna[0][j][i]=dna[0][j][i-1];
dna[1][j][i]=dna[1][j][i-1];
}
dna[0][mp[s[i]]][i]++;
dna[1][mp[ss[i]]][i]++;
//
}
for(int i=0;i<s.size();i++){
if(i)for(int j=0;j<6;j++)res[i][j]=res[i-1][j];
if(s[i]=='A'){
if(ss[i]=='T'){
res[i][0]++;
Compilation message (stderr)
# | 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... |