Codeforces Round #386 (Div. 2), problem: (B) Decoding Solution in C/C++

By | 2017-01-06T18:14:38+00:00 January 6th, 2017|Categories: Blog, C/C++|Tags: , , , , , , , |

Codeforces Round #386 (Div. 2), problem: (B) Decoding Solution in C/C++   #include<stdio.h> int main(){ int n,i;char a[2001]; scanf("%d",&n); scanf("%s",a); n-=1; for(i=n-1;i>=0;i-=2) { printf("%c",a[i]); } if(n%2==0) i=0; else i=1; for(i;i<=n;i+=2) printf("%c",a[i]); return 0; }