🟡 Տվյալների վերականգնում

Նախորդ խնդրում մենք գրեցինք տվյալների սեղման պարզ ծրագիր։ Այժմ անհրաժեշտ է գրել ծրագիր, որը վերականգնում է սեղմած տվյալները։
Օրինակներ՝
Մուտք - “3D2a5d2f"։ Ելք - "DDDaadddddff"
Մուտք - 3a3b3c։ Ելք - aaabbbccc
#include <iostream>
#include <string>

std::string decompress(std::string text) {
  //TODO: Put your code here
}

int main() {
    std::string compressedText;
    std::cout << "Compressed text: ";
    std::getline(std::cin, compressedText);
    std::cout << compressedText << std::endl;
    std::cout << "Compressed text size: " << compressedText.size() << " bytes"<< std::endl;
    // TODO: Put your code here
}
 

Հուշում 1

std::stoi ֆունկցիան թույլ է տալիս տողից ստանալ int տիպի արժեք։
 
 

Constraints

Time limit: 0.2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue