Page 5 of 5 <12345
Topic Options
#187239 - 2008-04-23 10:09 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Sealeopard]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
 Originally Posted By: Sealeopard
I've added RemcovC's test case 7 to the official package. No more tests will be added. Hope you guys now go back to coding instead of creating test cases \:\)


No, you haven't \:\)

At least I got no more errors if I take Remcos posted ini in opposite to if I take the downloaded one
_________________________



Top
#187245 - 2008-04-23 11:06 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Hmmm, I've got an idea ... but its too late for today
_________________________



Top
#187271 - 2008-04-24 06:19 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
*toc toc*
Hello?
...
Helloooho!
... is there anybody in here?

Hmmm, what's up with you guys? There's still some time left \:\)
_________________________



Top
#187278 - 2008-04-24 08:07 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
k, let's get it on...

Function a($r)
Dim $b, $d, $, $i, $k[9], $t, $x, $y, $z
	
	$b = split("._.|.||_| .....|..| ._.._||_. ._.._|._| ...|_|..| ._.|_.._| ._.|_.|_| ._...|..| ._.|_||_| ._.|_|._|")
	For $a = 0 To 8
		$ = ""
		For $z = 0 To 2
			$ = $ + SubStr($r[$z], $a * 3 + 1, 3)
		Next
		$k[$a]=AScan($b, $)		
	Next
	$a = failure
	For $t = 0 to 8
	    $x = Ascan($k,~)
		If $x = $t ^ $x = -1
			$i = ""
			For $x = 0 to 9
				$ = 1
				For $z = 0 to 8
					If SubStr($b[$x], $z+1, 1) = "." & SubStr($r[$z/3], $z mod 3 + $t * 3 + 1, 1) > "."
						$ = 0
					EndIf
				Next
				If $
					$i = $i + $x
				EndIf
			Next
			For $z = 1 to $i^0
				$ = ""
				$x = 0
				For $d = 0 to 8
					$y = IIf($t = $d, SubStr($i,$z,1), $k[$d])
					$x = $x + (9 - $d) * $y
					$ = $ + $y
				Next
				If $x mod 11 = 0
					$a = Iif($a>Z, $, ambiguous)
;				Endif
;			Next
;		EndiF
;	Next
EndFunction



Your solution passed all tests

KiXtart
KiXtart Version  = 4.60
KiXGolf Script   = kixgolf_cs.kix

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Check Scanning
Processing Start = 2008/04/24 20:05:27.156
Processing End   = 2008/04/24 20:05:27.203
Duration         = 0000/00/00 00:00:00.046
KiXGolf Score    = 541

Thank you for participating in KiXtart Golf!

I knew that there were too many variables...

[edit: I still have no clue what happens here]


Edited by Jochen (2008-04-24 08:09 PM)
Edit Reason: huh?
_________________________



Top
#187289 - 2008-04-25 05:24 AM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Jochen]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Finally, some movement on the score.

Jens
_________________________
There are two types of vessels, submarines and targets.

Top
Page 5 of 5 <12345


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 327 anonymous users online.
Newest Members
Jojo67, MaikSimon, kvn317, kixtarts2025, SERoyalty
17873 Registered Users

Generated in 0.059 seconds in which 0.028 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org