#include <bits/stdc++.h>

using namespace std;

//****
string HexToBin(string hexdec)
{
	long int i = 0;
    string ans;
	while (hexdec[i]) {

		switch (hexdec[i]) {
		case '0':
// 			cout << "0000";
			ans+="0000";
			break;
		case '1':
// 			cout << "0001";
            ans+="0001";
			break;
		case '2':
// 			cout << "0010";
            ans+="0010";
			break;
		case '3':
// 			cout << "0011";
            ans+="0011";
			break;
		case '4':
// 			cout << "0100";
            ans+="0100";
			break;
		case '5':
// 			cout << "0101";
            ans+="0101";
			break;
		case '6':
// 			cout << "0110";
            ans+="0110";
			break;
		case '7':
// 			cout << "0111";
            ans+="0111";
			break;
		case '8':
// 			cout << "1000";
            ans+="1000";
			break;
		case '9':
// 			cout << "1001";
            ans+="1001";
			break;
		case 'A':
		case 'a':
// 			cout << "1010";
            ans+="1010";
			break;
		case 'B':
		case 'b':
// 			cout << "1011";
            ans+="1011";
			break;
		case 'C':
		case 'c':
// 			cout << "1100";
            ans+="1100";
			break;
		case 'D':
		case 'd':
// 			cout << "1101";
            ans+="1101";
			break;
		case 'E':
		case 'e':
// 			cout << "1110";
            ans+="1110";
			break;
		case 'F':
		case 'f':
// 			cout << "1111";
            ans+="1111";
			break;
		}
		i++;
	}
// 	cout<<hexdec<<endl;
return ans;
}

//****

int main()
{
    string a,s;
    cin>>s;
    for(int i=0;i<11;i++){
        // int j=0;
        if(s[i]!='.')
        a.push_back(s[i]);
        // else j++;
    }
    
    map<string,char> table;
    
    table.insert({"110001000101",'A'});
    table.insert({"1100010001011110",'B'});
    table.insert({"110001000110",'C'});
    table.insert({"1100010001011",'D'});
    table.insert({"1",'E'});
    table.insert({"01",'F'});
    table.insert({"00",'G'});
    
    // for(auto it=table.begin();it!=table.end();it++){
    //     cout<<it->first<<" "<<it->second<<endl;
    // }
    
    // cout<<a<<endl;
    // cout<<HexToBin(a)<<endl;
    string s1=HexToBin(a);
    
    vector<char> v;
    
    for(auto it=table.begin();it!=table.end();it++){
        int l=it->first.size();
        for(int i=0;i<l;i++){
            
        }
    }
    

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: