#191512 - 2008-12-30 09:41 PM
Re: KiXgolf: Instruens Fabulam - public round
[Re: Lonkero]
|
DrillSergeant
MM club member
Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
|
oh, I'm working on something alright...
I wanted to post some other (intermediate) solutions, but you didn't give me any time
Your solution passed all tests
KiXtart
KiXtart Version = 4.60
KiXGolf Script = kixgolf_if.KIX
Computer
OS = Windows Vista Business Edition
CPU = Intel Pentium Model 15
Speed = 2194 MHz
Memory = 2038 MB
KiXGolf Scoring Engine
Scoring Engine = 3.3
KiXtart Golf Score
Tournament = Instruens Fabulam
Processing Start = 2008/12/30 21:39:41.499
Processing End = 2008/12/30 21:39:41.530
Duration = 0000/00/00 00:00:00.031
KiXGolf Score = 401
Thank you for participating in KiXtart Golf!
; begin KiXgolfUDF
;
;!
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $o, $r, $t[($d^)-1],$x
$ = @crlf
For $k = 0 to 1
$c='@' + join($t,'-') + '@'
$r = $c + $
$x = '|' + join($t,'+') + '|' + $
For each $i in split($l,$)
For $j = 0 to ($d^)-1
$ = ' ' + split($i,'&')[$j] + ' '
$p = $t[$j]
while ($p^)<($^)
$p = $p + '-'
Loop
while ($p^)>($^)
$o = substr($d,$j+1,1)
$ = iif($o='>',' ' + $,iif($o='=',right(' '+$+' ',($p^)),$+' '))
Loop
$t[$j] = $p
$r = $r + '|' + $
Next
$ = @crlf
$r = $r + '|'+$ + $x
$x = @
$cif = $r + $c
EndFunction
;!
;!
; end KiXgolfUDF
_________________________
The Code is out there
|
Top
|
|
|
|
#191515 - 2008-12-30 10:19 PM
Re: KiXgolf: Instruens Fabulam - public round
[Re: Lonkero]
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
and I WAS WRONG. lol... kinda dirty but works.
397
did I say something about IIF???
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $r, $t[($d^)-1],$x
$ = @crlf
For $k = 0 to 1
$c='@' + join($t,'-') + '@'
$r = $c + $
$x = '|' + join($t,'+') + '|' + $
For each $i in split($l,$)
For $j = 0 to ($d^)-1
$ = split($i,'&')[$j]
$p = $t[$j]
while ($p^)<($^)+2
$p = $p + '-'
Loop
while ($p^)>($^)+2
$ = substr(' ' + $ + ' ',1+(($^) mod 2)),' ' + $,$ + ' '
$ = $[instr("><",substr($d,$j+1,1))]
Loop
$t[$j] = $p
$r = $r + '| ' + $ + ' '
Next
$ = @crlf
$r = $r + '|'+$ + $x
$x = @
$cif = $r + $c
EndFunction
_________________________
!download KiXnet
|
Top
|
|
|
|
#191518 - 2008-12-30 10:31 PM
Re: KiXgolf: Instruens Fabulam - public round
[Re: Lonkero]
|
DrillSergeant
MM club member
Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
|
LOL! Was that your christmas present to me?
Your solution passed all tests
KiXtart
KiXtart Version = 4.60
KiXGolf Script = kixgolf_if.KIX
Computer
OS = Windows Vista Business Editi
CPU = Intel Pentium Model 15
Speed = 2194 MHz
Memory = 2038 MB
KiXGolf Scoring Engine
Scoring Engine = 3.3
KiXtart Golf Score
Tournament = Instruens Fabulam
Processing Start = 2008/12/30 22:30:29.365
Processing End = 2008/12/30 22:30:29.412
Duration = 0000/00/00 00:00:00.046
KiXGolf Score = 388
Thank you for participating in KiXtart Golf!
; begin KiXgolfUDF
;
;!
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $r, $t[($d^)-1],$x
$ = @crlf
For $k = 0 to 1
$c='@' + join($t,'-') + '@'
$r = $c + $
$x = '|' + join($t,'+') + '|' + $
For each $i in split($l,$)
For $j = 0 to ($d^)-1
$ = ' ' + split($i,'&')[$j] + ' '
$p = $t[$j]
while ($p^)<($^)
$p = $p + '-'
Loop
while ($p^)>($^)
$ = right(' '+$+' ',($p^)),' ' + $,$ + ' '
$ = $[instr("><",substr($d,$j+1,1))]
Loop
$t[$j] = $p
$r = $r + '|' + $
Next
$ = @crlf
$r = $r + '|'+$ + $x
$x = @
$cif = $r + $c
EndFunction
;!
;!
; end KiXgolfUDF
_________________________
The Code is out there
|
Top
|
|
|
|
#191522 - 2008-12-30 10:42 PM
Re: KiXgolf: Instruens Fabulam - public round
[Re: Lonkero]
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
385
; begin KiXgolfUDF
;
;!
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $r, $t[($d^)-1],$x
For $k = 0 to 1
$ = @crlf
$c='@' + join($t,'-') + '@'
$r = $c + $
$x = '|' + join($t,'+') + '|' + $
For each $i in split($l,$)
For $j = 0 to ($d^)-1
$ = ' ' + split($i,'&')[$j] + ' '
$p = $t[$j]
while ($p^)<($^)
$p = $p + '-'
Loop
while ($p^)>($^)
$ = right(' '+$+' ',($p^)),' ' + $,$ + ' '
$ = $[instr("><",substr($d,$j+1,1))]
Loop
$t[$j] = $p
$r = $r + '|' + $
Next
$r = $r + '|'+@crlf + $x
$x = @
$cif = $r + $c
EndFunction
;!
;!
; end KiXgolfUDF
_________________________
!download KiXnet
|
Top
|
|
|
|
#191526 - 2008-12-30 10:50 PM
Re: KiXgolf: Instruens Fabulam - public round
[Re: Lonkero]
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
You guys have a real talent... Too bad there no real $$$ in it.
|
Top
|
|
|
|
#191528 - 2008-12-31 12:46 AM
Re: KiXgolf: Instruens Fabulam - public round
[Re: Allen]
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
k, here is again easy one to crack. anyone?
379
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $r, $t[($d^)-1],$x
For $k = 0 to 1
$ = @crlf
$c='@' + join($t,'-') + '@'
$r = $c + $
$x = '|' + join($t,'+') + '|' + $
For each $i in split($l,$)
For $j = 0 to ($d^)-1
$ = ' ' + split($i,'&')[$j] + ' '
$p = $t[$j]
while ($p^)<($^)
$p = $p + '-'
Loop
while ($p^)>($^)
$ = $ + ' ',right(' '+$+' ',($p^)),' ' + $
$ = $[asc(substr($d,$j+1))-60]
Loop
$t[$j] = $p
$r = $r + '|' + $
Next
$r = $r + '|'+@crlf + $x
$x = @
$cif = $r + $c
EndFunction
_________________________
!download KiXnet
|
Top
|
|
|
|
#191529 - 2008-12-31 01:23 AM
Re: KiXgolf: Instruens Fabulam - public round
[Re: Lonkero]
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
a cheap one...
378
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $r, $t[($d^)-1],$x
For $k = 0 to 1
$ = @crlf
$c='@' + join($t,'-') + '@'
$r = $c + $
$x = '|' + join($t,'+') + '|' + $
For each $i in split($l,$)
For $j = 0 to ($d^)-1
$ = ' ' + split($i,'&')[$j] + ' '
$p = $t[$j]
while ($p^)<($^)
$p = $p + '-'
Loop
while ($p^)>($^)
$ = $ + ' ',right(' '+$+' ',$p^0),' ' + $
$ = $[asc(substr($d,$j+1))-60]
Loop
$t[$j] = $p
$r = $r + '|' + $
Next
$r = $r + '|'+@crlf + $x
$x = @
$cif = $r + $c
EndFunction
_________________________
!download KiXnet
|
Top
|
|
|
|
#191548 - 2009-01-02 10:33 AM
Re: KiXgolf: Instruens Fabulam - public round
[Re: Sealeopard]
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
It's not my algorithm, I pinched it from someone else.
It will always solve the Sudoku as it is a very simple brute force technique. It may however take a very very long time
I nicked it because I wanted a way to quickly generate a new filled grid to use in a Sudoku puzzle. The funny thing is that the completely random grid generator that I had already coded is actually faster most times
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 920 anonymous users online.
|
|
|