11734

#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
#include <iostream>

using namespace std;

int main()
{
	int t,kase=1;
	string org,ans,tmp1,tmp2;
	scanf("%d",&t);
	getchar();
	while(t--)
	{
		getline(cin,ans);
		getline(cin,org);
		if(org.size()==ans.size())
		{
			bool f=0;
			for(int i=0;i<org.size();i++)
			{
				if(org[i]!=ans[i])
				{
					f=1;break;
				}
			}
			if(f)
				printf("Case %d: Wrong Answer\n",kase++);
			else
				printf("Case %d: Yes\n",kase++);
		}
		else
		{
			tmp1="";tmp2="";
			for(int i=0;i<org.size();i++)
			{
				if(org[i]!=' ')
					tmp1.append(1u,org[i]);
			}
			for(int i=0;i<ans.size();i++)
			{
				if(ans[i]!=' ')
					tmp2.append(1u,ans[i]);
			}
			if(tmp1.size()!=tmp2.size())
			{
				printf("Case %d: Wrong Answer\n",kase++);
			}
			else
			{
				bool fl=0;
				for(int i=0;i<tmp1.size();i++)
				{
					if(tmp1[i]!=tmp2[i])
					{
						fl=1;break;
					}
				}
				if(fl)
					printf("Case %d: Wrong Answer\n",kase++);
				else
					printf("Case %d: Output Format Error\n",kase++);
			}
		}
	}
	return 0;
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *