#include <iostream>
#include <string>
#include <map>
#include <cctype>
using namespace std;
map <char, string> morze = {
{ 'о', "111"},
{ 'а', "1101"},
{ 'т', "1100"},
{ 'н', "1011"},
{ 'е', "1010"},
{ 'и', "1001"},
{ 'в', "1000"},
{ 'с', "0111"},
{ 'о', "01100"},
{ 'и', "01101"},
{ 'п', "01100"},
{ 'р', "0101"},
{ 'д', "01001"},
{ 'з', "01000"},
{ 'м', "00111"},
{ 'у', "00110"},
{ 'г', "00101"},
{ 'б', "001001"},
{ 'к', "001000"},
{ 'л', "000111"},
{ 'я', "000110"},
{ 'ь', "000101"},
{ 'ч', "000100"},
{ 'ж', "000011"},
{ 'э', "0000101"},
{ 'х', "0000100"},
{ 'й', "0000011"},
{ 'ш', "0000010"},
{ 'щ', "0000001"},
{ 'ю', "00000001"},
{ 'ц', "00000000"},
};
int main() {
string text;
while(cin >> text) {
for(int i = 0; i < text.length(); i++) {
text[i] = tolower(text[i]);
cout << morze.find( text[i] )->second <<" ";
}
}
return 0;
}
#include <iostream>
#include <cstdlib>
#include <ctime>
#include<fstream>
using namespace std;
void int_massiv()
{
int a[20];
int i;
int k;
cin >> k;
srand(time(NULL));
for (i = 0; i < k; i++)
a[i] = 0 + rand() % 20;
for (i = 0; i < k; i++)
cout<<a[i]<<" ";
fstream fout;
fout.open("100.txt");
for(i = 0; i < k; i++)
fout <<a[i]<< " ";
fout.close();
}
int main()
{
int_massiv();
}
#include <iostream>
#include <cstdlib>
#include <ctime>
#include<fstream>
using namespace std;
void int_massiv()
{
int a[20];
int i;
int k;
cin >> k;
srand(time(NULL));
for (i = 0; i < k; i++)
a[i] = 0 + rand() % 20;
for (i = 0; i < k; i++)
cout<<a[i]<<" ";
ofstream fout;
fout.open("100.txt");
fout <<a[i];
fout.close();
}
int main()
{
int_massiv();
}