The Good Guys plan to beat the Bad Guys by shooting them with ionizing radiation. To calibrate their weapons, the Good Guys need to know the composition of some interval of the Bad Guys' DNA. The Bad Guys are not just bad -- they're evil -- and so, they evolve every day by replacing each of the letters , , , and in their DNA with their corresponding strings of length : , , , and . There will be many fights over many days, and so the Good Guys need to make different queries consisting of three numbers -- , , and . For each query, you need to report four numbers, corresponding to the number of s, s, s, and s in the closed interval of the Bad Guys' DNA on the -th day.
Implementation details
You should implement the function :
std::vector<std::vector<longlong>>solve(
std::string S_0,
std::vector<std::string>S_ACGT,
std::vector<longlong>K,
std::vector<longlong>L,
std::vector<longlong> R
)
: the Bad Guys' DNA on the -th day.
: the strings .
: vector of non-negative integers, the -th of which is .
: vector of non-negative integers, the -th of which is .
: vector of non-negative integers, the -th of which is .
This function is called exactly once for each test case. It has to return a vector of -element vectors -- the number of s, s, s, and s in the corresponding queries.