⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1073.cpp

📁 杭电 acm部分代码 有兴趣的可以下载 谢谢
💻 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 + -