📄 1073.cpp
字号:
#include <iostream>
#include <string>
using namespace std;
string input,output;
char key[5005];
int main()
{
int test;
scanf("%d", &test);
getchar();
while (test--)
{
int num = 0;
while (true)
{
gets(key);
if (strcmp(key, "START") == 0)
{
if (num == 0)
{
input.erase();
output.erase();
}
}
else if (strcmp(key, "END") == 0)
{
num++;
if (num == 2)
{
break;
}
}
else
{
if (num == 0)
{
input += key;
input += '\n';
}
else if(num == 1)
{
output += key;
output += '\n';
}
}
}
if (input == output)
{
cout << "Accepted" << endl;
}
else
{
string t1, t2;
string::iterator point;
t1.erase();
t2.erase();
for (point = input.begin(); point < input.end(); point++)
{
if (*point != ' ' && *point != '\t' && *point != '\n')
{
t1 += *point;
}
}
for (point = output.begin(); point < output.end(); point++)
{
if (*point != ' ' && *point != '\t' && *point != '\n')
{
t2 += *point;
}
}
if (t1 == t2)
{
cout << "Presentation Error" << endl;
}
else
{
cout << "Wrong Answer" << endl;
}
}
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -