Page 1 of 6 12345>Last »
Topic Options
#179061 - 2007-08-10 01:12 AM KiXgolf: Top Secret - Public Round
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Private round is located at http://www.kixtart.org/forums/ubbthreads.php?ubb=newreply&Board=9&Number=179059

Please post your scores and corresponding codes and improve upon them.

Final results of the private round
 Code:
354 - Jooel
359 - DrillSergeant
425 - Howard Bullock
426 - Jochen
461 - sixdoubleo


Edited by Sealeopard (2007-08-13 04:01 AM)
_________________________
There are two types of vessels, submarines and targets.

Top
#179062 - 2007-08-10 01:23 AM Re: KiXgolf: Top Secret - Public Round [Re: Sealeopard]
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA




KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 599 MHz
Memory = 1024 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/09 19:22:03.441
Processing End = 2007/08/09 19:22:03.491
Duration = 0000/00/00 00:00:00.049
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 425

Thank you for participating in KiXtart Golf!




 Code:
; begin Top Secret
;
;!
Function a($f,$b,$c,$d)
  dim $, $g, $o, $j, $m

  $=createobject("VBscript.RegExp")
  $.Pattern="\W|\d"
  $.Global=1 
  $o=$.replace($c,"")
  $c=$.Execute($c)

  do
    $j=split($b,",")
    for $g=1 to $f
      if $f>($o^) 
        if $g>($o^)
          $.Pattern=""+$g+",?"
          $b=$.replace($b,"")
          $m=1+$m
        endif
      else
        $a=$a+substr($o,iif($d="E",$j[$g-1],ascan($j,$g)+1),1)
      endif
    next
    if $m=0
      $o=right($o,-$f)
    endif
    $f=$f-$m
    $m=0
  until $o=""

  for each $ in $c
    $m=$.FirstIndex
    $a=left($a,$m)+ $.value + substr($a,$m+1)
  
EndFunction
;!
;!
; end Top Secret 
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#179065 - 2007-08-10 02:02 AM Re: KiXgolf: Top Secret - Public Round [Re: Howard Bullock]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Nice Howard... I was trying to figure out how to use the regex replace thing, but never really got anywhere...

Here is how I was going at it, although it never quite worked right...

function a($l,$p,$m,$f)
dim $b,$c,$d,$e,$i,$j,$s,$
$=CreateObject("VBScript.RegExp")
$.Global = 1
$.Pattern="\w"
$e=split($p,",")
;? $m ?
for $j=1 to len($m)
if $i=$l
$b=$b+$l
if $.Execute(substr($m,$j+1,1)).count=0
$s=$s+1
endif
$i=0
endif
$c=substr($m,$j,1)
if $.Execute($c).count
$d=substr($m,$b+$e[$i]+$s,1)
if $s
$s=0
endif
if $.Execute($d).count=0
$d=substr($m,$b+$e[$i]-1,1)
endif
$a=$a+$d
if $.Execute(substr($m,$j+1,1)).count=0
$b=$b+1
endif
$i=$i+1
else
$a=$a+$c
endif
next
endfunction



Top
#179067 - 2007-08-10 02:21 AM Re: KiXgolf: Top Secret - Public Round [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, I took a traditional approach:




KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 797 MHz
Memory = 1014 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/09 22:56:23.781
Processing End = 2007/08/09 22:56:24.375
Duration = 0000/00/00 00:00:00.593
KiXGolf Result = Solution passed all 20 tests
KiXGolf Score = 354

Thank you for participating in KiXtart Golf!




code:

; begin Top Secret
;
;!
Function a($l,$b,$c,$d)
/*
1) the block length
2) the permutation
3) the message to be encoded or decoded
4) a parameter denoting encoding (E) or decoding (D)
*/

dim $i,$o[($c^)],$g,$,$r,$k
for $i=0 to ($c^)
$=substr($c,$i+1,1)
$a=asc(ucase($))
if $a>64 & $a<91
$g=$g+1
$k=$k+$
$r=$r+" "+$i
endif
$o[$i]=$
if $g=$l | $i=($c^)
for each $a in split($b,",")
if $i+$a-$g-1<($c^)
$=$+" "+$a
endif
next
$=split($)
for $a=1 to $g
$o[split($r)[iif($d=E,$a,$[$a])]]=substr($k,iif($d=E,$[$a],$a),1)
next
redim $r,$g,$k
$a=join($o,'')
EndFunction
;!
;!
; end Top Secret
_________________________
!

download KiXnet

Top
#179068 - 2007-08-10 02:51 AM Re: KiXgolf: Top Secret - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
btw, wasn't the private round gonna be extended to friday or something?
at least that's what I thought...
_________________________
!

download KiXnet

Top
#179070 - 2007-08-10 05:50 AM Re: KiXgolf: Top Secret - Public Round [Re: Lonkero]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Nope:
 Quote:

3) I'll extend the private round until Thursday 6pm EST
_________________________
There are two types of vessels, submarines and targets.

Top
#179071 - 2007-08-10 06:24 AM Re: KiXgolf: Top Secret - Public Round [Re: Howard Bullock]
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
changed: iif($d="E",$j[$g-1]
to: iif($d=E,$j[$g-1]

My code is now 423
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#179072 - 2007-08-10 07:54 AM Re: KiXgolf: Top Secret - Public Round [Re: Sealeopard]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
oh.
thursday translated somehow in my head.

np. had the leading score, so doesn't hurt \:\)
_________________________
!

download KiXnet

Top
#179073 - 2007-08-10 08:17 AM Re: KiXgolf: Top Secret - Public Round [Re: Lonkero]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands



; begin Top Secret
;
;!
Function a($b, $p, $, $h)
dim $c, $r, $x

Do
$x = Left($, 1)
$c = LCase($)
If ($c>` & $c<{)
$r = $r + $x
$x = Chr(1)
EndIf
$a = $a + $x
$ = Right($,~)
Until $=0

$p = Split($p,',')

For $c = 0 to ($r^) - 1
While $b + $c - $ > ($r^)
$p = Split(Right(Join(Split(' ' + Join($p), ' ' + $b), ''), ~))
$b = $b - 1
Loop

$x = InStr($a,Chr(1))
$a = Left($a,$x - 1) + Substr($r, $c + iif($h = E, $p[$], Ascan($p, $ + 1) + 1) - $,1) + Substr($a, $x + 1)
$ = ($ + 1) mod $b
EndFunction
;!
;!
; end Top Secret








KiXtart
KiXtart Version = 4.52
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 2261 MHz
Memory = 1024 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/10 08:37:45.921
Processing End = 2007/08/10 08:37:45.937
Duration = 0000/00/00 00:00:00.016
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 359

Thank you for participating in KiXtart Golf!




Edited by DrillSergeant (2007-08-10 08:40 AM)
_________________________
The Code is out there

Top
#179074 - 2007-08-10 08:33 AM Re: KiXgolf: Top Secret - Public Round [Re: DrillSergeant]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hey, you forgot to post your score along the code, dude!
_________________________
!

download KiXnet

Top
#179075 - 2007-08-10 08:40 AM Re: KiXgolf: Top Secret - Public Round [Re: Lonkero]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
sorry boss ;\)
_________________________
The Code is out there

Top
#179078 - 2007-08-10 10:14 AM Re: KiXgolf: Top Secret - Public Round [Re: Howard Bullock]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Howard you Basta, Congratulations

Wow, if this was the easy round I don't want to see what comes next

Anyway, here is my 426 code for the 4th Place:


Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows 2000 Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed = 2793 MHz
Memory = 504 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/10 09:56:54.953
Processing End = 2007/08/10 09:56:55.000
Duration = 0000/00/00 00:00:00.046
KiXGolf Score = 426

Thank you for participating in KiXtart Golf!


Code:


function a($b, $c, $i, $d)
while $i
dim $, $e, $f, $g, $h, $j, $k, $n
for $ = 1 to $i^0
if $f < $b
$j = substr($i,$,1)
$e = asc(ucase($j))
if $e<65 | $e>90
$g = 1 + $g
$h = ',' + $h + $ + ','
else
$f = 1 + $f
$n = split(join($n) + ' ' + $j)
endif
endif
next
$e = left($i,$f+$g)
$i = right($i,-$f-$g)
for each $ in split($c,",")
if 0+$ <= $f
$k = split(join($k) + ' ' + $)
endif
next
for $g = 1 to $e^0
if instr($h,','+$g+',')
$a = $a + substr($e,$g,1)
$j = 1 + $j
else
$ = 1 + $
if $d = E
$a = $a + $n[$k[$]]
else
$a = $a + $n[ascan($k,$g-$j)]
endfunction
_________________________



Top
#179079 - 2007-08-10 10:24 AM Re: KiXgolf: Top Secret - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Gawd!

missing the obvious

Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows 2000 Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed = 2793 MHz
Memory = 504 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/10 10:19:20.234
Processing End = 2007/08/10 10:19:20.281
Duration = 0000/00/00 00:00:00.047
KiXGolf Score = 423

Thank you for participating in KiXtart Golf!


function a($b, $c, $i, $d)
while $i
dim $, $e, $f, $g, $h, $j, $k, $n
for $ = 1 to $i^0
if $f < $b
$j = substr($i,$,1)
$e = lcase($j)
if $e<'a' | $e>'z'
$g = 1 + $g
$h = ',' + $h + $ + ','
else
$f = 1 + $f
$n = split(join($n) + ' ' + $j)
endif
endif
next
$e = left($i,$f+$g)
$i = right($i,-$f-$g)
for each $ in split($c,",")
if 0+$ <= $f
$k = split(join($k) + ' ' + $)
endif
next
for $g = 1 to $e^0
if instr($h,','+$g+',')
$a = $a + substr($e,$g,1)
$j = 1 + $j
else
$ = 1 + $
if $d = E
$a = $a + $n[$k[$]]
else
$a = $a + $n[ascan($k,$g-$j)]
endfunction
_________________________



Top
#179080 - 2007-08-10 10:29 AM Re: KiXgolf: Top Secret - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
even better...

Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows 2000 Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed = 2793 MHz
Memory = 504 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/10 10:25:50.906
Processing End = 2007/08/10 10:25:50.953
Duration = 0000/00/00 00:00:00.046
KiXGolf Score = 419

Thank you for participating in KiXtart Golf!



code:

function a($b, $c, $i, $d)
while $i
dim $, $e, $f, $g, $h, $j, $k, $n
for $ = 1 to $i^0
if $f < $b
$j = substr($i,$,1)
$e = lcase($j)
if $e>` & $e<{
$f = 1 + $f
$n = split(join($n) + ' ' + $j)
else
$g = 1 + $g
$h = ',' + $h + $ + ','
endif
endif
next
$e = left($i,$f+$g)
$i = right($i,-$f-$g)
for each $ in split($c,",")
if 0+$ <= $f
$k = split(join($k) + ' ' + $)
endif
next
for $g = 1 to $e^0
if instr($h,','+$g+',')
$a = $a + substr($e,$g,1)
$j = 1 + $j
else
$ = 1 + $
if $d = E
$a = $a + $n[$k[$]]
else
$a = $a + $n[ascan($k,$g-$j)]
endfunction
_________________________



Top
#179081 - 2007-08-10 10:37 AM Re: KiXgolf: Top Secret - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Right, now for some work to do... will be back tonight
_________________________



Top
#179082 - 2007-08-10 10:41 AM Re: KiXgolf: Top Secret - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Ok, one more for the road, I love KiXtart


Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows 2000 Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed = 2793 MHz
Memory = 504 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/10 10:37:57.015
Processing End = 2007/08/10 10:37:57.062
Duration = 0000/00/00 00:00:00.046
KiXGolf Score = 407

Thank you for participating in KiXtart Golf!



Code:

function a($b, $c, $i, $d)
while $i
dim $, $e, $f, $g, $h, $j, $k, $n
for $ = 1 to $i^0
if $f < $b
$j = substr($i,$,1)
$e = lcase($j)
if $e>` & $e<{
$f = 1 + $f
$n = split(join($n) + ' ' + $j)
else
$g = 1 + $g
$h = ´ + $h + $ + ´
endif
endif
next
$e = left($i,$f+$g)
$i = right($i,-$f-$g)
for each $ in split($c,",")
if 0+$ <= $f
$k = split(join($k) + ' ' + $)
endif
next
for $g = 1 to $e^0
if instr($h,´+$g+´)
$a = $a + substr($e,$g,1)
$j = 1 + $j
else
$ = 1 + $
if $d = E
$a = $a + $n[$k[$]]
else
$a = $a + $n[ascan($k,$g-$j)]
endfunction
_________________________



Top
#179083 - 2007-08-10 10:44 AM Re: KiXgolf: Top Secret - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
 Originally Posted By: Jooel
k, I took a traditional approach:


You call this traditional?

$o[split($r)[iif($d=E,$a,$[$a])]]=substr($k,iif($d=E,$[$a],$a),1)

Wow!
_________________________



Top
#179084 - 2007-08-10 11:01 AM Re: KiXgolf: Top Secret - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
btw here is a 357 score based on Rogier's code


Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows 2000 Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed = 2793 MHz
Memory = 504 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/10 10:57:05.796
Processing End = 2007/08/10 10:57:05.828
Duration = 0000/00/00 00:00:00.031
KiXGolf Score = 357

Thank you for participating in KiXtart Golf!


Code:


Function a($b, $p, $, $h)
dim $c, $r, $x

Do
$x = Left($, 1)
$c = LCase($)
If $c>` & $c<{
$r = $r + $x
$x = Chr(1)
EndIf
$a = $a + $x
$ = Right($,~)
Until $=0

$p = Split($p,',')

For $c = 0 to ($r^) - 1
While $b + $c - $ > ($r^)
$p = Split(Right(Join(Split(' ' + Join($p), ' ' + $b), ''), ~))
$b = $b - 1
Loop

$x = InStr($a,Chr(1))
$a = Left($a,$x - 1) + Substr($r, $c + iif($h = E, $p[$], Ascan($p, $ + 1) + 1) - $,1) + Substr($a, $x + 1)
$ = ($ + 1) mod $b
EndFunction



No need for that parens there,no?
_________________________



Top
#179086 - 2007-08-10 11:05 AM Re: KiXgolf: Top Secret - Public Round [Re: Jochen]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Jooel's code trimmed down to 347 by changing:
$a=asc(ucase($))
if $a>64 & $a<91

to

$a=lCase($)
if $a>` & $a<}




; begin Top Secret
;
;!
Function a($l,$b,$c,$d)
/*
1) the block length
2) the permutation
3) the message to be encoded or decoded
4) a parameter denoting encoding (E) or decoding (D)
*/

dim $i,$o[($c^)],$g,$,$r,$k
for $i=0 to ($c^)
$=substr($c,$i+1,1)
$a=lcase($)
if $a>` & $a<}
$g=$g+1
$k=$k+$
$r=$r+" "+$i
EndIf
$o[$i]=$
if $g=$l | $i=($c^)
for each $a in split($b,",")
if $i+$a-$g-1<($c^)
$=$+" "+$a
EndIf
Next
$=split($)
for $a=1 to $g
$o[split($r)[iif($d=E,$a,$[$a])]]=substr($k,iif($d=E,$[$a],$a),1)
Next
redim $r,$g,$k
$a=join($o,'')
EndFunction
;!
;!
; end Top Secret





KiXtart
KiXtart Version = 4.52
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 2261 MHz
Memory = 1024 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/10 11:00:43.296
Processing End = 2007/08/10 11:00:43.328
Duration = 0000/00/00 00:00:00.031
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 347

Thank you for participating in KiXtart Golf!


Edited by DrillSergeant (2007-08-10 11:16 AM)
Edit Reason: added score
_________________________
The Code is out there

Top
#179087 - 2007-08-10 11:07 AM Re: KiXgolf: Top Secret - Public Round [Re: Jochen]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
thanx Jochen, I just realised that one too ;\) , I guess the ( and ) did have a function once
_________________________
The Code is out there

Top
Page 1 of 6 12345>Last »


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

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.075 seconds in which 0.027 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