update loose_client.py 该模式需要配置环境变量judge_model=loose开启
尝试写了了宽松判题的模式,会AC以下3种情况: 忽略文件结尾的\n, 以及lrun输出文件“每行”最后的空格(可以多个) 输出结尾多余的空行 结尾多空格不AC,文件中间多空行不AC
This commit is contained in:
@@ -93,15 +93,26 @@ class JudgeClient(object):
|
|||||||
except IOError:
|
except IOError:
|
||||||
# 文件不存在等引发的异常 返回结果错误
|
# 文件不存在等引发的异常 返回结果错误
|
||||||
return False
|
return False
|
||||||
lines=std.readline()
|
sline = std.readline().strip('\n')
|
||||||
line_conut = len(lines)
|
line = f.readline().strip('\n')
|
||||||
for i in range(0, line_conut-2):
|
while sline:
|
||||||
if lines[i]
|
try:
|
||||||
|
while line[-1]==' ':
|
||||||
|
line = line[:-1]
|
||||||
|
except IndexError:
|
||||||
|
return False
|
||||||
|
if sline != line:
|
||||||
|
return False
|
||||||
|
sline = std.readline().strip('\n')
|
||||||
|
line = f.readline().strip('\n')
|
||||||
|
if line:
|
||||||
|
return False
|
||||||
|
line = f.readline()
|
||||||
|
while line and line == '\n':
|
||||||
|
line = f.readline()
|
||||||
|
if line:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def _judge_one(self, test_case_id):
|
def _judge_one(self, test_case_id):
|
||||||
# 运行lrun程序 接收返回值
|
# 运行lrun程序 接收返回值
|
||||||
|
|||||||
Reference in New Issue
Block a user