結果
| 問題 |
No.5007 Steiner Space Travel
|
| コンテスト | |
| ユーザー |
yas_yasyu
|
| 提出日時 | 2023-04-27 01:11:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,609 bytes |
| コンパイル時間 | 564 ms |
| コンパイル使用メモリ | 86,856 KB |
| 実行使用メモリ | 82,868 KB |
| スコア | 0 |
| 最終ジャッジ日時 | 2023-04-27 01:12:07 |
| 合計ジャッジ時間 | 13,723 ms |
|
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 30 |
ソースコード
import sys
import subprocess
args = sys.argv
run_cmd = "n"
file_number = 0
if len(args) > 1:
if args[1].isdecimal():
file_number = args[1]
if len(args) > 2:
if not args[2].isdecimal():
run_cmd = args[2]
else:
run_cmd = "p"
else:
run_cmd = "n"
else:
run_cmd = args[1]
if len(args) > 2:
if args[2].isdecimal():
file_number = args[2]
else:
run_cmd = "p"
pwd_folder = r"/home/yas_yasyu/work/mnt5/"
in_folder = pwd_folder + r"input/"
out_folder = pwd_folder + r"output/"
cmd_folder = pwd_folder + r"steiner-space-travel/"
arg_command = "'python3 main.py'"
file = f"{str(file_number).zfill(4)}"
in_file = f"{in_folder}{file}.txt"
out_file = f"{out_folder}{file}.txt"
img_folder = "img/"
img_file = f"{pwd_folder}{img_folder}{file}.png"
def run(cmd):
print(cmd)
subprocess.run(
cmd,
shell=True,
cwd = pwd_folder
)
def normal():
cmd = f"{arg_command} < {in_file} > {out_file}"
run(cmd)
cmd = f"dotnet {cmd_folder}tester.dll judge -i {in_file} -o {out_file}"
run(cmd)
def vis():
cmd = f"{arg_command} < {in_file} > {out_file}"
run(cmd)
cmd = f"dotnet {cmd_folder}tester.dll judge -i {in_file} -o {out_file} -v {img_file}"
run(cmd)
def all():
parallel = 8
cmd = f"dotnet {cmd_folder}tester.dll judge-all -i {in_folder} -c {arg_command} -p {parallel}"
subprocess.run(
cmd,
shell=True,
cwd = pwd_folder
)
def panic():
print("python3 tester.py $cmd")
print('$cmd : v 10')
print('$cmd : 10')
print('$cmd : a')
exit()
if not run_cmd in "nvap":
panic()
run_act = {
"n": normal,
"v": vis,
"a": all,
"p": panic
}
run_act[run_cmd]()
yas_yasyu