贡献SPJ
查看原帖
贡献SPJ
1023961
Ryzen_9_9950X3D楼主2023/12/3 16:17
#include "testlib.h"

int main(int argc,char *argv[])
{
    string x = ans.readToken();
    string y = ouf.readToken();
    if(x == "Cannot")
    {
    	if(y != x)
    	{
    	    quitf(_wa, "The answer is wrong: expected = %s, found = %s", x, y);
    	}
    	ans.readSpace();
    	ouf.readSpace();
    	x = ans.readToken();
    	y = ouf.readToken();
    	if(y != x)
    	{
    	    quitf(_wa, "The answer is wrong: expected = %s, found = %s", x, y);
    	}
    	else quitf(_ok, "The answer is correct.");
    }
    else
    {
    	if(y == "Cannot")
    	{
            quitf(_wa, "The answer is wrong: expected = %s, found = %s", x, y);
        }
        else if(y != x)
		{
			while(!ans.eof())
			{
				ans.readEoln(); 
				ouf.readEoln(); 
				x = ans.readToken();
    			y = ouf.readToken();
				if(x != y)
				{
					quitf(_wa, "The answer is wrong: expected = %s, found = %s", x, y);
				}
			}
			quitp(0.5,"Partially Correct get %d percent", 50);
		}
		else
		{
			while(!ans.eof())
			{
				ans.readEoln(); 
				ouf.readEoln(); 
				x = ans.readToken();
    			y = ouf.readToken();
				if(x != y)
				{
					quitf(_wa, "The answer is wrong: expected = %s, found = %s", x, y);
				}
			}
			quitf(_ok, "The answer is correct.");
		}
    }
    return 0;
}
2023/12/3 16:17
加载中...