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 11:36:03.501
Processing End = 2007/08/10 11:36:03.541
Duration = 0000/00/00 00:00:00.040
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 338

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^0], $, $r, $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] = $

  If ($k^)=$l | $i=($c^)
    for each $ in Split($b,",")
      if $i+$-($k^)<=($c^)
        $a=$a+" "+$
      EndIf
    Next
    $a=split($a)
    For $=1 to ($k^)
      $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
 
_________________________
Home page: http://www.kixhelp.com/hb/