# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
299141 | theshadow_04 | Mobitel (COCI14_mobitel) | C++14 | 1 ms | 384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/** VU TRUONG AN **/
#include <bits/stdc++.h>
#define FOR(i,x,y) for(int i = x; i <= y ; ++i)
#define FORN(i,x,y) for(int i = x; i >= y ; --i)
#define F first
#define S second
#define maxn 1005
#define mp make_pair
#define pb push_back
#define ll long long
#define Task "mobitel"
using namespace std;
int a[10];
string s;
void Xuli(char aa)
{
if(aa == 'a'|| aa == 'A')
cout << a[2];
if(aa == 'b'|| aa == 'B')
cout << a[2] << a[2];
if(aa == 'c'|| aa == 'C')
cout << a[2] << a[2] << a[2];
if(aa == 'd'|| aa == 'D')
cout << a[3];
if(aa == 'e'|| aa == 'E')
cout << a[3] << a[3];
if(aa == 'f'|| aa == 'F')
cout << a[3] << a[3] << a[3];
if(aa == 'g'|| aa == 'G')
cout << a[4];
if(aa == 'h'|| aa == 'H')
cout << a[4] << a[4];
if(aa == 'i'|| aa == 'I')
cout << a[4] << a[4] << a[4];
if(aa == 'j'|| aa == 'J')
cout << a[5];
if(aa == 'k'|| aa == 'K')
cout << a[5] << a[5];
if(aa == 'l'|| aa == 'L')
cout << a[5] << a[5] << a[5];
if(aa == 'm'|| aa == 'M')
cout << a[6];
if(aa == 'n'|| aa == 'N')
cout << a[6] << a[6];
if(aa == 'o'|| aa == 'O')
cout << a[6] << a[6] << a[6];
if(aa == 'p'|| aa == 'P')
cout << a[7];
if(aa == 'q'|| aa == 'Q')
cout << a[7] << a[7];
if(aa == 'r'|| aa == 'R')
cout << a[7] << a[7] << a[7];
if(aa == 's'|| aa == 'S')
cout << a[7] << a[7] << a[7] << a[7];
if(aa == 't'|| aa == 'T')
cout << a[8];
if(aa == 'u'|| aa == 'U')
cout << a[8] << a[8];
if(aa == 'v'|| aa == 'V')
cout << a[8] << a[8] << a[8];
if(aa == 'w'|| aa == 'W')
cout << a[7];
if(aa == 'x'|| aa == 'X')
cout << a[7] << a[7];
if(aa == 'y'|| aa == 'Y')
cout << a[7] << a[7] << a[7];
if(aa == 'z'|| aa == 'Z')
cout << a[7] << a[7] << a[7] << a[7];
}
int main()
{
ios_base::sync_with_stdio(0);
cout.tie(0); cin.tie(0);
for(int i = 1;i <= 9;i++)
cin >> a[i];
cin >> s;
for(int i = 0;i < s.length();i++)
{
if(i != (s.length()-1))
{
Xuli(s[i]);
cout << "#";
}
else Xuli(s[i]);
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |