杭电acm1073

#include<iostream>
#include<string>
using namespace std;
int main()
{
    int t,i;
    string s1,s2;
    string data,input;
    scanf("%d",&t);
    getchar();            //过滤掉数字后的回车字符,防止后面多读一行
    while(t--)
    {
        data = input = "";
        while(getline(cin,s1) && s1!="END")
        {
            if (s1=="")        //处理空行,下同
                 data+='\n';
            data+=s1;
        }
        while(getline(cin,s2) && s2!="END")
        {
            if (s2=="")
                 input+='\n';
            input+=s2;
        }
        if(data==input)
        {
            printf("Accepted\n");continue;
        }
        s1=s2="";
        for(i=5;i<data.length();i++)
            if(data[i]!='\t'&&data[i]!='\n'&&data[i]!=' ')
                s1+=data[i];
        for(i=5;i<input.length();i++)
            if(input[i]!='\t'&&input[i]!='\n'&&input[i]!=' ')
                s2+=input[i];
        if(s1!=s2)printf("Wrong Answer\n");
        else printf("Presentation Error\n");
    }
    return 0;
}


posted @ 2015-12-08 13:11  StevenLuke  阅读(104)  评论(0编辑  收藏  举报