Presentation Error
Presentation Error
Wrong Answer
Presentation Error

Code
#include<stdio.h>
#include<string.h>
char a[5005],b[5005],tmp[5005];
int t;
void input(char *str)
{
getchar();
gets(tmp);
str[0]='\0';
while(gets(tmp)&&strcmp(tmp,"END")){
if(strlen(tmp)==0)
strcat(str,"\n");
else
strcat(str,tmp);
}
}
void mdo(char *s)
{
int i,j;
int len=strlen(s);
for(i=0,j=0;i<len;i++){
if(s[i]==' '||s[i]=='\t'||s[i]=='\n')
continue;
tmp[j++]=s[i];
}
tmp[j]='\0';
strcpy(s,tmp);
}
int process()
{
mdo(a);mdo(b);
if(strcmp(a,b)==0)
return 1;
return 0;
}
int main()
{
scanf("%d",&t);
while(t--){
input(a);
input(b);
if(strcmp(a,b)==0)
printf("Accepted\n");
else if(process())
printf("Presentation Error\n");
else
printf("Wrong Answer\n");
}
}