제출 #437025

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4370252021-06-25 16:07:12model_codeDNA 돌연변이 (IOI21_dna)C++17
100 / 100
127 ms7584 KiB
#include "dna.h"
#include <bits/stdc++.h>
using namespace std;
const string kDna = "ACT";
const int K = kDna.size();
vector<int> prefix_sum[sizeof(char) << 8][sizeof(char) << 8];
int cnt[sizeof(char) << 8][sizeof(char) << 8];
vector<string> dna_subsets;
constexpr int kImpossible = -1;
void init(string A, string B) {
int N = A.size();
for (int c1 : kDna) {
for (int c2 : kDna) {
prefix_sum[c1][c2].resize(N);
}
}
for (int c1 : kDna) {
for (int c2 : kDna) {
for (int i = 0; i < N; ++i) {
prefix_sum[c1][c2][i] = (c1 == A[i] && c2 == B[i]) ? 1 : 0;
if (i > 0) {
prefix_sum[c1][c2][i] += prefix_sum[c1][c2][i - 1];
}
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...