# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
634051 | sword060 | Mobitel (COCI14_mobitel) | C++17 | 0 ms | 212 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;
int main(){
ios::sync_with_stdio(0); cin.tie(0);
int a[10],y;
for(int i=1;i<=9;i++)cin>>y,a[y]=i;
string s;cin>>s;
int lst=-1;
for(auto& i:s){
int c=i-'a';
int k=c/3,m=c%3;
if(k==lst)cout<<'#';
for(int j=0;j<=m;j++)
cout<<a[k+2];
lst=k;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |