Untitled

mail@pastecode.io avatar
unknown
c_cpp
8 months ago
1.3 kB
0
Indexable
Never
std::vector<std::string> identicalSequences()
{
    std::string randomSequence = "DAHKSEVAHRFKDLGEENFKALVLIAFAQYLQQCPFEDHVKLVNEVTEFAKTCVADESAENCDKSLHTLFGDKLCTVATLRETYGEMADCCAKQEPERNECFLQHKD"
     "DNPNLPRLVRPEVDVMCTAFHDNEETFLKKYLYEIARRHPYFYAPELLFFAKRYKAAFTECCQAADKAACLLPKLDELRDEGKASSAKQRLKCASLQKFGERAFKA"
     "WAVARLSQRFPKAEFAEVSKLVTDLTKVHTECCHGDLLECADDRADLAKYICENQDSISSKLKECCEKPLLEKSHCIAEVENDEMPADLPSLAADFVESKDVCKNY"
     "AEAKDVFLGMFLYEYARRHPDYSVVLLLRLAKTYETTLEKCCAAADPHECYAKVFDEFKPLVEEPQNLIKQNCELFEQLGEYKFQNALLVRYTKKVPQVSTPTLVE"
     "VSRNLGKVGSKCCKHPEAKRMPCAEDYLSVVLNQLCVLHEKTPVSDRVTKCCTESLVNRRPCFSALEVDETYVPKEFNAETFTFHADICTLSEKERQIKKQTALVE"
     "LVKHKPKATKEQLKAVMDDFAAFVEKCCKADDKETCFAEEGKKLVAASQAALGL";
     
    std::random_device rd;
    std::mt19937 generator(rd());
    std::uniform_int_distribution<int> distribution(1, 20);
    std::vector<std::string> modifiedStrings;

    for (int i = 0; i < 1000; i++) {
        std::string modifiedString = originalString;
        int numToRemove = distribution(generator); 
        for (int j = 0; j < numToRemove && !modifiedString.empty(); j++) {
            int posToRemove = distribution(generator) % modifiedString.length();
            modifiedString.erase(posToRemove, 1);
        }
        modifiedStrings.push_back(modifiedString);
    }
    return modifiedStrings;
}