def validate(self,pid):
"""
This function compares the output file with the key
Args :
pid : The id of the problem to map to the correct key.
Returns :
WA : Wrong Answer , if comparison fails.
AC : Accepted , if comparison succeeds.
"""
if filecmp.cmp(self.cwd+"/tmp/output.txt",self.cwd+"/env/key/key"+str(pid)+".txt")==True:
return "AC"
else:
return "WA"
评论列表
文章目录