Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- using ll = long long;
- using ld = long double;
- int main()
- {
- vector<string> s{"BFPV", "CGJKQSXZ", "DT", "L", "MN", "R"};
- map<char, char> z1;
- for (int i = 0; i < 6; i++)
- {
- for (auto cl : s.at(i))
- {
- z1[cl] = to_string(i + 1).at(0);
- }
- }
- string a;
- while (cin >> a)
- {
- char tipe = z1[a.at(0)];
- cout << tipe;
- for (int i = 0; i < a.size(); i++)
- {
- if (z1[a.at(i)] != tipe)
- {
- tipe = z1[a.at(i)];
- cout << tipe;
- }
- }
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment