aboutsummaryrefslogtreecommitdiff
path: root/works/life/algorithm-contest-2/gen.ps1
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-02-28 23:13:39 +0800
committerYuqian Yang <crupest@crupest.life>2025-02-28 23:13:39 +0800
commitdc1f0c4c0096013799416664894c5194dc7e1f52 (patch)
tree2f5d235f778cd720f4c39ec3e56b77ba6d99f375 /works/life/algorithm-contest-2/gen.ps1
parent7299d424d90b1effb6db69e3476ddd5af72eeba4 (diff)
downloadcrupest-dc1f0c4c0096013799416664894c5194dc7e1f52.tar.gz
crupest-dc1f0c4c0096013799416664894c5194dc7e1f52.tar.bz2
crupest-dc1f0c4c0096013799416664894c5194dc7e1f52.zip
chore(store): move everything to store.
Diffstat (limited to 'works/life/algorithm-contest-2/gen.ps1')
-rw-r--r--works/life/algorithm-contest-2/gen.ps139
1 files changed, 0 insertions, 39 deletions
diff --git a/works/life/algorithm-contest-2/gen.ps1 b/works/life/algorithm-contest-2/gen.ps1
deleted file mode 100644
index 60b88b2..0000000
--- a/works/life/algorithm-contest-2/gen.ps1
+++ /dev/null
@@ -1,39 +0,0 @@
-Push-Location solution
-
-foreach ($problem in 1..5) {
- clang-cl "$problem.cpp" /O2 "-fsanitize=address,undefined"
-}
-
-Pop-Location
-
-Remove-Item -Recurse output
-
-mkdir .\output
-
-$time_output = @()
-
-foreach ($problem in 1..5) {
- mkdir output/$problem
- foreach ($genfile in Get-ChildItem "generator/$problem") {
- if ($genfile.Name -match "(.+)\.in") {
- $genfile_id = $Matches[1]
- Copy-Item $genfile output/$problem
- }
- elseif ($genfile.Name -match "(.+)\.cpp") {
- $genfile_id = $Matches[1]
- Push-Location "generator/$problem"
- clang-cl $genfile.Name /O2 "-fsanitize=address,undefined"
- Pop-Location
- & "./generator/$problem/$genfile_id.exe" > "./output/$problem/$genfile_id.in"
- }
- $time = (Measure-Command {
- Get-Content "./output/$problem/$genfile_id.in" | & "./solution/$problem.exe" > "./output/$problem/$genfile_id.out"
- }).TotalSeconds
-
- $time_output += "Problem $problem test point $genfile_id time: $time s."
- }
-}
-
-foreach ($line in $time_output) {
- Write-Output $line
-}