Damn jooel, you golfed the f out of this function. Here's one more stroke...i knew i got a math minor for a reason.
Code:
Function f($u)
dim $,$i,$j,$c
$j=ubound($u)
while $c<$j
dim $x[$j]
$f='' $c=0
for $=1 to 2*(0^join($u,''))
$f=$f+rnd(1)
$=$+$j
next
for $=0 to $j
for $i=0 to $j
if 1 ^ $x[$i] | $x[$] | $i=$ | $f<>$u[$]+$u[$i]
$c=$c+2
$x[$i]=1
$x[$]=1
Endfunction
Quote:
KiXtart Engine
KiXtart Version = 4.50
KiXGolf Script = kixgolf_fragmentation.kix
Computer
OS = Windows XP Professional
CPU = Intel(R) Xeon(TM) CPU 2.80GHz
Speed = 2790 MHz
Memory = 1024 MB
KiXGolf Scoring Engine
Scoring Engine = 3.0.3
KiXGolf Score
Tournament = Fragmentation
Processing Start = 2005/10/07 07:31:15.755
Processing End = 2005/10/07 07:31:43.052
Duration = 0000/00/00 00:00:27.296
# Tests Run = 180
# Tests Passed = 180
# Tests Failed = 0
Result = passed
KiXGolf Score = 206