delete codeup category and update README.md and complete 2467.py and 27433.py and create new run.py and init_make.py for better testcases management

This commit is contained in:
2024-05-13 09:44:23 +09:00
parent aca3dee092
commit f0a4551df2
9 changed files with 252 additions and 7 deletions

31
init_make.py Normal file
View File

@@ -0,0 +1,31 @@
import sys
import os
import glob
TC_TARGET_DIR = "_testcases"
DEFAULT_COUNT = 1
if __name__ == "__main__":
count = DEFAULT_COUNT
match len(sys.argv):
case 1:
pass
case 2 if sys.argv[1].isdigit() and int(sys.argv[1]) > 0:
count = int(sys.argv[1])
case _:
print("Invalid arguments.")
sys.exit()
# default make
if not os.path.exists("./" + TC_TARGET_DIR):
os.mkdir(TC_TARGET_DIR)
for i in range(1, count + 1):
default_in_path = "./" + TC_TARGET_DIR + f"/{i}.in"
default_out_path = "./" + TC_TARGET_DIR + f"/{i}.out"
with open(default_in_path, "w", encoding="utf-8") as _:
pass
with open(default_out_path, "w", encoding="utf-8") as _:
pass