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!



 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],$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 
_________________________
Home page: http://www.kixhelp.com/hb/