Submission #715899

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7158992023-03-28 11:30:59ngano_upat_naMutating DNA (IOI21_dna)C++17
35 / 100
49 ms8780 KiB
#include "dna.h"
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
const int N = 100009;
vector<int> A0(N,0), A1(N,0);
vector<int> T0(N,0), T1(N,0);
vector<int> C0(N,0), C1(N,0);
vector<int> AC(N,0), CA(N,0), AT(N,0), TA(N,0), TC(N,0), CT(N,0);
string s, t;
void init(string a, string b) {
s = a;
t = b;
int sz = (int)a.size();
for (int i=0; i<sz; i++) {
A0[i+1] = A0[i];
T0[i+1] = T0[i];
C0[i+1] = C0[i];
if (s[i] == 'A') A0[i+1]++;
if (s[i] == 'T') T0[i+1]++;
if (s[i] == 'C') C0[i+1]++;
}
for (int i=0; i<sz; i++) {
A1[i+1] = A1[i];
T1[i+1] = T1[i];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...