# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
74100 | 2018-08-30T05:42:54 Z | charlies_moo | Tavan (COCI16_tavan) | C++14 | 2 ms | 852 KB |
#include <cstdio> #include <iostream> #include <string> using namespace std; char letter[]={"0123456789ABCDEFGHIJKLHIMNOPQRSTUVWXYZ"}; string to; int num; void change(int x) { if(x) change(x/num); to+=letter[x%num]; } int main() { string voc,c[505],ans; int n,m,k,x,count_=0; cin>>n>>m>>k>>x; cin>>voc; for(int i=0;i<m;i++) cin>>c[i]; num=k+1; change(x); while(to.size()<m) { char zero='0'; to.insert(0,"0"); } for(int i=0;i<n;i++) if(voc[i]!='#') ans+=voc[i]; else { if(to[count_]>='0' && to[count_]<='9') ans+=c[count_++][to[count_]-'0']; else ans+=c[count_++][to[count_]-'A'+10]; } cout<<ans; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 504 KB | Output isn't correct |
2 | Incorrect | 2 ms | 644 KB | Output isn't correct |
3 | Incorrect | 2 ms | 644 KB | Output isn't correct |
4 | Incorrect | 2 ms | 644 KB | Output isn't correct |
5 | Incorrect | 2 ms | 724 KB | Output isn't correct |
6 | Incorrect | 2 ms | 724 KB | Output isn't correct |
7 | Incorrect | 2 ms | 728 KB | Output isn't correct |
8 | Incorrect | 2 ms | 732 KB | Output isn't correct |
9 | Incorrect | 2 ms | 852 KB | Output isn't correct |
10 | Incorrect | 2 ms | 852 KB | Output isn't correct |