添加若干相同题目记录
This commit is contained in:
parent
c6218377e6
commit
0faf9dea34
|
|
@ -1,9 +1,9 @@
|
|||
import os,re,difflib,Levenshtein,time,json
|
||||
|
||||
# 重要!!! 新旧题目的范围(有重复默认为新题)
|
||||
id_new_problems = "15311:15331"
|
||||
id_new_problems = "1:50000"
|
||||
id_old_problems = "1:50000"
|
||||
threshold = 0.85
|
||||
threshold = 0.9999
|
||||
|
||||
#生成数码列表, 逗号分隔每个区块, 区块内部用:表示整数闭区间
|
||||
def generate_number_set(string):
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ pro_dict = json.loads(database)
|
|||
with open(filename,"r",encoding = "utf8") as f:
|
||||
similar_text = "\n"+f.read()
|
||||
|
||||
similar_types = re.findall(r"\n[\d]\.[\d]{4}[\s]*([srSRnN ])[\s]*\n",similar_text)
|
||||
similar_types = re.findall(r"\n[\d]\.[\d]{4}[\s]*([srSRnN])*[\s]*\n",similar_text)
|
||||
similar_problems = re.findall(r"\n([\d]{6}) ",similar_text)
|
||||
|
||||
if len(similar_types) * 2 == len(similar_problems):
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Reference in New Issue