#179090 - 2007-08-10 11:27 AM
Re: KiXgolf: Top Secret - Public Round
[Re: Jochen]
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
not too much but 2 strokes less with mine:
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 11:22:11.265
Processing End = 2007/08/10 11:22:11.328
Duration = 0000/00/00 00:00:00.063
KiXGolf Score = 405
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 + $
$a = iif($d=E, $a+$n[$k[$]], $a+$n[ascan($k,$g-$j)])
endfunction
_________________________
|
Top
|
|
|
|
#179094 - 2007-08-10 01:21 PM
Re: KiXgolf: Top Secret - Public Round
[Re: Jochen]
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Lowered my code one more stroke to 422 by changing:
until $o="" to until $o=0
Now to get a headache analyzing Jooel's traditional code.
|
Top
|
|
|
|
#179095 - 2007-08-10 01:43 PM
Re: KiXgolf: Top Secret - Public Round
[Re: Howard Bullock]
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Jooel's code tidied up a little. Changed some ($c^) to $c^0.
<br><br><pre style="background:white;border-style:solid;border-color:silver;">
KiXtart KiXtart Version = 4.52 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/10 07:40:23.621 Processing End = 2007/08/10 07:40:23.661 Duration = 0000/00/00 00:00:00.040 KiXGolf Result = Solution passed all 18 tests KiXGolf Score = <font color="red">345</font> Thank you for participating in KiXtart Golf! </pre><br><br>
; 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^0],$g,$,$r,$k
for $i=0 to $c^0
$=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
|
Top
|
|
|
|
#179096 - 2007-08-10 01:45 PM
Re: KiXgolf: Top Secret - Public Round
[Re: Howard Bullock]
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Bad post that I can not delete.
Edited by Howard Bullock (2007-08-10 02:32 PM)
|
Top
|
|
|
|
#179099 - 2007-08-10 02:18 PM
Re: KiXgolf: Top Secret - Public Round
[Re: Jochen]
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4548
Loc: USA
|
What THE HELL is this Frankenstein crap? And who is the Basta that figured it out?
|
Top
|
|
|
|
#179100 - 2007-08-10 02:19 PM
Re: KiXgolf: Top Secret - Public Round
[Re: Jochen]
|
DrillSergeant
MM club member
Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
|
Working 344 code:
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 14:17:44.609 Processing End = 2007/08/10 14:17:44.640 Duration = 0000/00/00 00:00:00.031 KiXGolf Result = Solution passed all 18 tests KiXGolf Score = 344 Thank you for participating in KiXtart Golf!
; 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^0],$g,$,$r,$k
for $i=0 to $c^0
$=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<=($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
_________________________
The Code is out there
|
Top
|
|
|
|
#179103 - 2007-08-10 02:37 PM
Re: KiXgolf: Top Secret - Public Round
[Re: Allen]
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
KiXtart KiXtart Version = 4.52 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/10 08:36:32.715 Processing End = 2007/08/10 08:36:32.755 Duration = 0000/00/00 00:00:00.040 KiXGolf Result = Solution passed all 18 tests KiXGolf Score = 342 Thank you for participating in KiXtart Golf!
; 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^0],$g,$,$r,$k
for $i=0 to $c^0
$=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<=($c^)
$=$+" "+$a
EndIf
Next
$a=split($)
for $=1 to $g
$o[split($r)[iif($d=E,$,$a[$])]]=substr($k,iif($d=E,$a[$],$),1)
Next
redim $r,$g,$k
$a=join($o,'')
EndFunction
;!
;!
; end Top Secret
|
Top
|
|
|
|
#179104 - 2007-08-10 02:38 PM
Re: KiXgolf: Top Secret - Public Round
[Re: Allen]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
Myabe I am doing something wrong, but I just re-downloaded Jen's zip file and tried Drill's code and it fails 8 out of 18, but I am confused because Drill's output shows all 18 passed.
|
Top
|
|
|
|
#179106 - 2007-08-10 03:10 PM
Re: KiXgolf: Top Secret - Public Round
[Re: Jochen]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
My bad I was running ver 4.51, now running 4.53 all is good
Edited by Benny69 (2007-08-10 03:13 PM)
|
Top
|
|
|
|
#179108 - 2007-08-10 03:14 PM
Re: KiXgolf: Top Secret - Public Round
[Re: DrillSergeant]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
Drill your code is good see previous post
|
Top
|
|
|
|
#179113 - 2007-08-10 04:10 PM
Re: KiXgolf: Top Secret - Public Round
[Re: DrillSergeant]
|
DrillSergeant
MM club member
Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
|
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 16:07:24.328 Processing End = 2007/08/10 16:07:24.359 Duration = 0000/00/00 00:00:00.030 KiXGolf Result = Solution passed all 18 tests KiXGolf Score = 339 Thank you for participating in KiXtart Golf!
; begin Top Secret
;
;!
Function a($l,$b,$c,$d)
dim $i, $o[$c^0], $, $r, $g, $k
For $i=0 to $c^0
$=Substr($c,$i+1,1)
$a=LCase($)
If $a>` & $a<}
$k=$k+$
$r=$r+" "+$i
EndIf
$o[$i] = $
$g = $k^0
If $g=$l | $i=($c^)
for each $ in Split($b,",")
if $i+$-$g<=($c^)
$a=$a+" "+$
EndIf
Next
$a=split($a)
For $=1 to $g
$o[split($r)[iif($d=E,$,$a[$])]] = substr($k,iif($d=E,$a[$],$),1)
Next
redim $r,$k
$a=join($o,'')
EndFunction
;!
;!
; end Top Secret
_________________________
The Code is out there
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 331 anonymous users online.
|
|
|