summaryrefslogtreecommitdiffstats
path: root/01-knapsack/run
blob: df6db5e58ef219e7f7ccbedbf6cf9066986d3b44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/bash

RESET="\033[0m"
RED="\033[0;31m"

BIN=${BIN:-ks_dp-ng}
${CC:-clang} -O2 -pedantic -Wall -o $BIN $BIN.c || exit 1

DATAS=(ks_4_0 ks_19_0 ks_30_0 ks_40_0 ks_45_0 ks_50_0 ks_50_1 ks_60_0 ks_100_0 ks_100_1 ks_100_2 ks_200_0 ks_200_1 ks_300_0 ks_400_0 ks_500_0 ks_1000_0 ks_10000_0)
VALUES=(19 12248 99798 99924 23974 142156 5345 99837 99837 1333930 10892 100236 1103604 1688692 3967180 54939 109899 1099893)

for((i=0;i<${#DATAS[@]};i++))
do
   data="./data/${DATAS[$i]}"
   value="${VALUES[$i]}"
   echo -e "$RED *** $data -e $value $@ $RESET"
   ./$BIN $data -e $value $@
done