代码拉取完成,页面将自动刷新
import os
import sys
targetDirectory = "lemonpack/" + input()
if targetDirectory[-1] == '/':
targetDirectory = targetDirectory[:-1]
os.system("mkdir -p " + targetDirectory)
os.system("mkdir -p " + targetDirectory + "/data")
os.system("mkdir -p " + targetDirectory + "/sample")
os.system("mkdir -p " + targetDirectory + "/source/std")
while True:
args = list(input().split())
directory, short = args[0], args[1]
os.system("mkdir -p " + targetDirectory + "/data/" + short)
os.system("mkdir -p " + targetDirectory + "/sample/" + short)
os.system("mkdir -p " + targetDirectory + "/source/std/" + short)
dataDirectory = directory + "/tests"
testfiles = os.listdir(dataDirectory)
for file in testfiles:
if 'samples' in file:
os.system('cp ' + dataDirectory + '/' + file + ' ' + targetDirectory + '/sample/' + short + '/' + file)
else:
os.system('cp ' + dataDirectory + '/' + file + ' ' + targetDirectory + '/data/' + short + '/' + file)
os.system('cp {}/std.cpp {}/source/std/{}/{}.cpp'.format(directory, targetDirectory, short, short))
if 'spj' in args:
os.system('cp {}/checker.cpp {}/data/{}/checker.cpp'.format(directory, targetDirectory, short))
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。