// Online C++ compiler to run C++ program online
#include <bits/stdc++.h>
using namespace std;
string solve(string &s , unordered_map<string , char>map1)
{
char p;
if(s.substr(0 , 3) == "000")
{
p= 'd';
}
else
{
p = 'r';
}
string result = "";
for(int i = 3 ; i < s.length(); i+=3)
{
char x = map1[s.substr(i , 3)];
if(p == 'd')
{
if(x == 'U')
result.push_back('T');
else
result.push_back(x);
}
else
{
if(x == 'T')
result.push_back('U');
else
result.push_back(x);
}
}
return result;
}
void solve(string s )
{
return;
}
int main() {
unordered_map<string, char>map1 = {
{"001", 'C'} ,
{"010", 'G'},
{"011", 'A'},
{"101" , 'T'},
{"110", 'U'}
};
string s = "111001010110101011010101001";
// cout << s.length() << "\n";
string p = solve(s , map1);
cout << p << "\n";
return 0;
}
All AKTU Quantums are available here. Get your hands on AKTU Quantums and boost your grades in AKTU semester exams. You can either search them category wise or can use the search bar or can manually search on this page. Download aktu second year quantum pdf data structures download data structures quantum aktu download aktu data structures quantum click here to download write in comment section if you want quantum of any other subject.
Comments
Post a Comment