# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
866044 | mamion | Mobitel (COCI14_mobitel) | C++11 | 0 ms | 436 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.
#include<bits/stdc++.h>
using namespace std;
string c[27] = {
"2", "22", "222", "3", "33", "333", "4", "44", "444",
"5", "55", "555", "6", "66", "666", "7", "77", "777", "7777",
"8", "88", "888", "9", "99", "999", "9999"
};
map<int, int> m;
int main() {
for (int i = 1; i <= 9; i++) {
int a; cin >> a;
m[a] = i;
}
string s; cin >> s;
string p;
for (char a: s) {
if (c[a-'a'][0] == p[0]) cout << '#';
for (char b: c[a-'a']) cout << m[b-'0'];
p = c[a-'a'];
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |