Add least action example and output ignore rules

This commit is contained in:
2026-06-03 14:44:04 +08:00
parent 4b06b7fdd0
commit af6c816dcf
5 changed files with 280 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
from pathlib import Path
import subprocess
import sys
def main() -> None:
case_dir = Path(__file__).resolve().parent
root_dir = case_dir.parent.parent
input_path = case_dir / "input" / "input.txt"
output_path = case_dir / "output" / "result.txt"
program_path = root_dir / "least_action.py"
subprocess.run(
[sys.executable, str(program_path), str(input_path), str(output_path)],
check=True,
)
if __name__ == "__main__":
main()