自己手写的。
#include "testlib.h"
int main(int argc, char* argv[])
{
registerTestlibCmd(argc, argv);
int n=ans.readInt(),m=ouf.readInt(),line=1;
if(n==-1)
{
if(m!=-1) quitf(_wa, "The answer is wrong: expected = -1, found = %d.", m);
else quitf(_ok, "The answer is correct.");
}
int a=inf.readInt(),b=inf.readInt(),c=inf.readInt(),ansa,ansb,ansc;
bool mp[210][210][210],aa[210][210],bb[210][210],cc[210][210];
for(int i=1,x,y,z;i<=m;i++)
{
x=ouf.readInt(),y=ouf.readInt(),z=ouf.readInt();
if(x<-100 || x>100 || y<-100 || y>100 || z<-100 || z>100)
quitf(_wa, "The answer is wrong: the output is out of range [-100,100].");
x+=100,y+=100,z+=100;
if(mp[x][y][z])
quitf(_wa, "The answer is wrong: the cube is repetitive.");
mp[x][y][z]=1;
ansa+=!aa[x][y],ansb+=!bb[x][z],ansc+=!cc[y][z],aa[x][y]=1,bb[x][z]=1,cc[y][z]=1;
}
if(a==ansa && b==ansb && c==ansc) quitf(_ok, "The answer is correct.");
else quitf(_wa, "The answer is wrong: the solution is wrong.");
return 0;
}