UVA Problem 11734 Solution- Big Number of Teams will Solve This

Problem Solving, UVa

 

 

#include <stdio.h>

#include <string.h>

int main()

{

    char s1[500],s2[500],s1s[500],s2s[500];

    int t,i,j,k;

   

    scanf("%d ",&t);

    for(i=0;i<t;i++){

      gets(s1);

      gets(s2);

      if(strcmp(s1,s2)==0)printf("Case %d: Yes\n",i+1);

      else {

          k=0;

        for(j=0;j<strlen(s1);j++){

          if(s1[j]!=' '){

            s1s[k]=s1[j];

             k++;

          }

        }

      s1s[k]='\0';

      k=0;

      for(j=0;j<strlen(s2);j++){

        if(s2s[j]!=' '){

         s2s[k]=s2[j];

         k++;

        }



      }

      s2s[k]='\0';

      if(strcmp(s1s,s2s)==0)printf("Case %d: Output Format Error\n",i+1);

      else printf("Case %d: Wrong Answer\n",i+1);



      }





    }





    return 0;

}

 

0 Comments

You may find interest following article

Complete Guide: Create Laravel Project in Docker Without Local Dependencies

Create Laravel Project Through Docker — No Need to Install PHP, MySQL, or Apache on Your Local Machine In this tutorial, I’ll show you how to create and run a full Laravel project using Docker containers. That means you won’t have to install PHP, MySQL, or Apache locally on your computer. By the end of this guide, you’ll have a fully functional Laravel development...