About Me

About Me : I have been working as a Software Engineer for various international companies for four years.Currently, I am working as a full stack Javascript developer in Petronas(Malaysia).

Skills

Skills • Javascript •Typescript •Python •C •Java •ReactJs • Redux • VueJs • NestJs • React Testing Library • Django• PostgreSQL • MySQL • NodeJs • Git • Docker • Jira • Visual Studio Code • Slack

শনিবার, ২৭ ডিসেম্বর, ২০১৪

UVA :11220 - Decoding the message. solution

#include <iostream>
#include<cstdio>
#include<cstring>
#include<vector>
#define READ freopen("in.txt","r",stdin);

using namespace std;

int main()
{
    // READ
     int test;
     char ss[20000];
     scanf("%d",&test);
     getchar();
     getchar();
     for(int k=1;k<=test;k++)
     {

           printf("Case #%d:\n",k);
          while(gets(ss))
          {

              if(ss[0]=='\0') break;
              char *ptr;
              ptr=strtok(ss," ");
              int i=1;
              while(ptr!=NULL)
              {
                  string s=ptr;

                  if(s.length()>=i)
                  {
                      cout<<s[i-1];
                      i++;
                  }

                  ptr=strtok(NULL," ");

              }

              printf("\n");
          }

        if(k!=test) printf("\n");
     }

    return 0;
}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন