Added python script for test input generation and shell script for running

This commit is contained in:
Dmitriy Shishkov 2021-10-31 15:04:02 +03:00
parent 614dfdd03d
commit 8555f1e30e
No known key found for this signature in database
GPG Key ID: 14358F96FCDD8060
3 changed files with 17 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
a.out
main
.vscode
vgcore*
vgcore*
output.txt

11
input.py Normal file
View File

@ -0,0 +1,11 @@
import sys
try:
n = int(sys.argv[1])
except:
n = 5
print(n)
for i in range(n):
print(i, -i if i % 2 == 0 else i)

4
run.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
gcc main.c
python input.py $1 | tee /dev/fd/2 | ./a.out | tee output.txt