code cleanup

This commit is contained in:
2021-07-25 16:53:07 +02:00
parent f5ba7165c0
commit 0223d4bd2c
2 changed files with 3 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ ex1:
@#$(TIME) ex1-c 2020 < $(INPUT) 2>&1
ex2:
@#$(TIME) ex2.bash < $(INPUT) 2>&1
@$(TIME) ex2.bash < $(INPUT) 2>&1
@#$(TIME) ex1-c 30000000 < $(INPUT) 2>&1
clean:

View File

@@ -6,10 +6,9 @@ CMD=${0##*/}
set -o noglob
shopt -s extglob
#declare -A strings
declare -a strings T R B L RT RR RB RL nums
declare -i res=1 count=-1
declare -i count=-1
while read -r line; do
case ${line:0:1} in
T*)
@@ -54,10 +53,9 @@ for key in "${!nums[@]}"; do
done
ALL="${T[@]} ${R[@]} ${B[@]} ${L[@]} ${RT[@]} ${RR[@]} ${RB[@]} ${RL[@]}"
ALL="${T[*]} ${R[*]} ${B[*]} ${L[*]} ${RT[*]} ${RR[*]} ${RB[*]} ${RL[*]}"
ALLSIZE=${#ALL}
declare -i res=1 count
for ((i=0; i<${#nums[@]}; ++i)); do
count=0