Submission #634051

#TimeUsernameProblemLanguageResultExecution timeMemory
634051sword060Mobitel (COCI14_mobitel)C++17
0 / 50
0 ms212 KiB
#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 timeMemoryGrader output
Fetching results...