增加提示字段和转换PAT时间内存单位

This commit is contained in:
virusdefender 2016-03-06 11:21:16 +08:00 committed by Lost_in_wine
parent 5a687c00c4
commit e83ecc7c24
2 changed files with 6 additions and 1 deletions

View File

@ -56,7 +56,11 @@ class PATRobot(Robot):
"submit_url": r'<form accept-charset="UTF-8" action="([\s\S]*?)" method="post">'}
data = self._regex_page(url, regex)
data["id"] = problem_id
data["time_limit"] = int(data["time_limit"])
data["memory_limit"] = int(data["memory_limit"]) // 1024
data["submit_url"] = "https://www.patest.cn" + data["submit_url"]
# pat上都没有提示
data["hint"] = None
return data
def _regex_page(self, url, regex):

View File

@ -44,7 +44,8 @@ class Robot(object):
"samples": [{"input": String, "output": String}],
"spj": True/False,
"time_limit": Int ms,
"memory_limit": Int M}
"memory_limit": Int M,
"hint": String/None}
"""
raise NotImplementedError()