From 4e2b6312bae0a9ec4a1b54c6221505dc1ccec304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Fri, 3 Nov 2023 17:30:18 +0100 Subject: brain damage fix dn02 --- "\305\241ola/p1/dn/DN02_63230317.java" | 2 +- "\305\241ola/p1/dn/DN02_Testi/test01.in" | 4 ++++ "\305\241ola/p1/dn/DN02_Testi/test02.in" | 4 ++++ "\305\241ola/p1/dn/DN02_Testi/test03.in" | 4 ++++ "\305\241ola/p1/dn/DN02_Testi/test04.in" | 4 ++++ "\305\241ola/p1/dn/DN02_Testi/test05.in" | 4 ++++ "\305\241ola/p1/dn/DN02_Testi/test06.in" | 4 ++++ "\305\241ola/p1/dn/DN02_Testi/test07.in" | 4 ++++ "\305\241ola/p1/dn/DN02_Testi/test08.in" | 4 ++++ "\305\241ola/p1/dn/tj.sh" | 7 +++---- 10 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 "\305\241ola/p1/dn/DN02_Testi/test01.in" create mode 100644 "\305\241ola/p1/dn/DN02_Testi/test02.in" create mode 100644 "\305\241ola/p1/dn/DN02_Testi/test03.in" create mode 100644 "\305\241ola/p1/dn/DN02_Testi/test04.in" create mode 100644 "\305\241ola/p1/dn/DN02_Testi/test05.in" create mode 100644 "\305\241ola/p1/dn/DN02_Testi/test06.in" create mode 100644 "\305\241ola/p1/dn/DN02_Testi/test07.in" create mode 100644 "\305\241ola/p1/dn/DN02_Testi/test08.in" (limited to 'šola') diff --git "a/\305\241ola/p1/dn/DN02_63230317.java" "b/\305\241ola/p1/dn/DN02_63230317.java" index 95522d6..a5b8b9a 100644 --- "a/\305\241ola/p1/dn/DN02_63230317.java" +++ "b/\305\241ola/p1/dn/DN02_63230317.java" @@ -31,7 +31,7 @@ public class DN01_63230317 { koord[0] += velikost(obroč(tipka))/4; koord[1] -= indeks(tipka)-velikost(obroč(tipka))/4; } else if (indeks(tipka) < 3*velikost(obroč(tipka))/4) { - koord[0] += velikost(obroč(tipka))/4-(3*velikost(obroč(tipka))/4-indeks(tipka)); + koord[0] += 3*velikost(obroč(tipka))/4-indeks(tipka); koord[1] -= velikost(obroč(tipka))/4; } else koord[1] -= velikost(obroč(tipka))-indeks(tipka); diff --git "a/\305\241ola/p1/dn/DN02_Testi/test01.in" "b/\305\241ola/p1/dn/DN02_Testi/test01.in" new file mode 100644 index 0000000..4397070 --- /dev/null +++ "b/\305\241ola/p1/dn/DN02_Testi/test01.in" @@ -0,0 +1,4 @@ +1 +15 +3 +4 13 7 \ No newline at end of file diff --git "a/\305\241ola/p1/dn/DN02_Testi/test02.in" "b/\305\241ola/p1/dn/DN02_Testi/test02.in" new file mode 100644 index 0000000..176f5a3 --- /dev/null +++ "b/\305\241ola/p1/dn/DN02_Testi/test02.in" @@ -0,0 +1,4 @@ +2 +6 +4 +9 11 31 12 \ No newline at end of file diff --git "a/\305\241ola/p1/dn/DN02_Testi/test03.in" "b/\305\241ola/p1/dn/DN02_Testi/test03.in" new file mode 100644 index 0000000..4ff34c8 --- /dev/null +++ "b/\305\241ola/p1/dn/DN02_Testi/test03.in" @@ -0,0 +1,4 @@ +3 +5 +3 +23 9 0 \ No newline at end of file diff --git "a/\305\241ola/p1/dn/DN02_Testi/test04.in" "b/\305\241ola/p1/dn/DN02_Testi/test04.in" new file mode 100644 index 0000000..adf10fe --- /dev/null +++ "b/\305\241ola/p1/dn/DN02_Testi/test04.in" @@ -0,0 +1,4 @@ +4 +7 +5 +15 11 42 0 8 \ No newline at end of file diff --git "a/\305\241ola/p1/dn/DN02_Testi/test05.in" "b/\305\241ola/p1/dn/DN02_Testi/test05.in" new file mode 100644 index 0000000..41e8fe8 --- /dev/null +++ "b/\305\241ola/p1/dn/DN02_Testi/test05.in" @@ -0,0 +1,4 @@ +1 +103 +13 +24 12 54 23 23 98 12 34 8 0 12 77 12 \ No newline at end of file diff --git "a/\305\241ola/p1/dn/DN02_Testi/test06.in" "b/\305\241ola/p1/dn/DN02_Testi/test06.in" new file mode 100644 index 0000000..cd495da --- /dev/null +++ "b/\305\241ola/p1/dn/DN02_Testi/test06.in" @@ -0,0 +1,4 @@ +2 +11 +8 +119 13 24 0 96 21 3 8 diff --git "a/\305\241ola/p1/dn/DN02_Testi/test07.in" "b/\305\241ola/p1/dn/DN02_Testi/test07.in" new file mode 100644 index 0000000..691a653 --- /dev/null +++ "b/\305\241ola/p1/dn/DN02_Testi/test07.in" @@ -0,0 +1,4 @@ +3 +7 +6 +4 0 19 37 25 28 \ No newline at end of file diff --git "a/\305\241ola/p1/dn/DN02_Testi/test08.in" "b/\305\241ola/p1/dn/DN02_Testi/test08.in" new file mode 100644 index 0000000..c91be2b --- /dev/null +++ "b/\305\241ola/p1/dn/DN02_Testi/test08.in" @@ -0,0 +1,4 @@ +4 +9 +7 +17 0 8 26 58 14 17 \ No newline at end of file diff --git "a/\305\241ola/p1/dn/tj.sh" "b/\305\241ola/p1/dn/tj.sh" index 5e2cb11..705db03 100755 --- "a/\305\241ola/p1/dn/tj.sh" +++ "b/\305\241ola/p1/dn/tj.sh" @@ -10,7 +10,7 @@ for f in $2/*.in do echo -n "$f ... " uspeh=0 - out=$(timeout 5s /usr/bin/time --quiet -f %E diff --side-by-side <(java $1 < $f) `sed s/in$/out/ <<<$f` 2>&1) && uspeh=1 + out=$(timeout 5s /usr/bin/time --quiet -f %E diff --ignore-trailing-space --side-by-side <(java $1 < $f) `sed s/in$/out/ <<<$f` 2>&1) && uspeh=1 koda=$? if [ $uspeh -eq 0 ] then @@ -19,12 +19,12 @@ do predolg=$(($predolg+1)) echo "PREKORAČEN ČAS 5s!" echo "VHOD:" - cat $f + tac $f | tac else napa=$(($napa+1)) echo "NAPAČEN IZHOD! Čas izvajanja: `tail -n1 <<<$out`" echo "VHOD:" - cat $f + tac $f | tac echo "IZHOD: Levo je vaš izhod, desno je pravilen izhod:" head -n-1 <<<$out fi @@ -32,7 +32,6 @@ do uspelih=$(($uspelih+1)) echo "USPELO! Čas izvajanja: `tail -n1 <<<$out`" fi - echo done echo "uspešnih testov: $uspelih" echo "napačnih izhodov: $napa" -- cgit v1.2.3