diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2023-11-03 17:30:18 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2023-11-03 17:30:18 +0100 |
commit | 4e2b6312bae0a9ec4a1b54c6221505dc1ccec304 (patch) | |
tree | 5ce658813f7777b7e5898b448c70d4575515f465 /šola | |
parent | dn02 fix (diff) | |
download | r-4e2b6312bae0a9ec4a1b54c6221505dc1ccec304.tar r-4e2b6312bae0a9ec4a1b54c6221505dc1ccec304.tar.gz r-4e2b6312bae0a9ec4a1b54c6221505dc1ccec304.tar.bz2 r-4e2b6312bae0a9ec4a1b54c6221505dc1ccec304.tar.lz r-4e2b6312bae0a9ec4a1b54c6221505dc1ccec304.tar.xz r-4e2b6312bae0a9ec4a1b54c6221505dc1ccec304.tar.zst r-4e2b6312bae0a9ec4a1b54c6221505dc1ccec304.zip |
Diffstat (limited to 'šola')
-rw-r--r-- | šola/p1/dn/DN02_63230317.java | 2 | ||||
-rw-r--r-- | šola/p1/dn/DN02_Testi/test01.in | 4 | ||||
-rw-r--r-- | šola/p1/dn/DN02_Testi/test02.in | 4 | ||||
-rw-r--r-- | šola/p1/dn/DN02_Testi/test03.in | 4 | ||||
-rw-r--r-- | šola/p1/dn/DN02_Testi/test04.in | 4 | ||||
-rw-r--r-- | šola/p1/dn/DN02_Testi/test05.in | 4 | ||||
-rw-r--r-- | šola/p1/dn/DN02_Testi/test06.in | 4 | ||||
-rw-r--r-- | šola/p1/dn/DN02_Testi/test07.in | 4 | ||||
-rw-r--r-- | šola/p1/dn/DN02_Testi/test08.in | 4 | ||||
-rwxr-xr-x | šola/p1/dn/tj.sh | 7 |
10 files changed, 36 insertions, 5 deletions
diff --git a/šola/p1/dn/DN02_63230317.java b/šola/p1/dn/DN02_63230317.java index 95522d6..a5b8b9a 100644 --- a/šola/p1/dn/DN02_63230317.java +++ b/šola/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/šola/p1/dn/DN02_Testi/test01.in b/šola/p1/dn/DN02_Testi/test01.in new file mode 100644 index 0000000..4397070 --- /dev/null +++ b/šola/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/šola/p1/dn/DN02_Testi/test02.in b/šola/p1/dn/DN02_Testi/test02.in new file mode 100644 index 0000000..176f5a3 --- /dev/null +++ b/šola/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/šola/p1/dn/DN02_Testi/test03.in b/šola/p1/dn/DN02_Testi/test03.in new file mode 100644 index 0000000..4ff34c8 --- /dev/null +++ b/šola/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/šola/p1/dn/DN02_Testi/test04.in b/šola/p1/dn/DN02_Testi/test04.in new file mode 100644 index 0000000..adf10fe --- /dev/null +++ b/šola/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/šola/p1/dn/DN02_Testi/test05.in b/šola/p1/dn/DN02_Testi/test05.in new file mode 100644 index 0000000..41e8fe8 --- /dev/null +++ b/šola/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/šola/p1/dn/DN02_Testi/test06.in b/šola/p1/dn/DN02_Testi/test06.in new file mode 100644 index 0000000..cd495da --- /dev/null +++ b/šola/p1/dn/DN02_Testi/test06.in @@ -0,0 +1,4 @@ +2 +11 +8 +119 13 24 0 96 21 3 8 diff --git a/šola/p1/dn/DN02_Testi/test07.in b/šola/p1/dn/DN02_Testi/test07.in new file mode 100644 index 0000000..691a653 --- /dev/null +++ b/šola/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/šola/p1/dn/DN02_Testi/test08.in b/šola/p1/dn/DN02_Testi/test08.in new file mode 100644 index 0000000..c91be2b --- /dev/null +++ b/šola/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/šola/p1/dn/tj.sh b/šola/p1/dn/tj.sh index 5e2cb11..705db03 100755 --- a/šola/p1/dn/tj.sh +++ b/šola/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" |