Thomas:
1. add water: 2 score (the first, the fastest)
2. add salt: 3 score (the first, the fastest,the smallest)
Sum: 5 scores
Eyin:
1. cars : 2 score (the first, the fastest)
2.mix max: 3 score (the first, the fastest, the smallest)
Sum 5 scores
bitRake
1.add water: 1 score (the smallest)
2.cars: 1 score (the smallest)

One task has not been solved yet: Dlg wich will recommend or to add water or to add salt depending
on wich percent of salt you wish to have in mixture.
You still can score for "the first"
Posted on 2002-02-10 11:03:43 by The Svin
Ok, I believe I managed to optimise Thomas's code
.data

x dword 4.0
y dword 8.0
w real4 7.0
;output:
salttoadd real4 0.0

;used in algo:
r100 real4 100.0

.code

;st0 st1
mov eax, offset y ;. .
fild dword ptr [eax] ;y .
fisub dword ptr [eax-4] ;y-x .
fld real4 ptr [r100] ;100 y-x
fisub dword ptr [eax] ;100-y y-x
fdiv ;(y-x)/(100-y) .
fmul real4 ptr [eax+4] ;w*(y-x)/(100-y) .
fstp real4 ptr [eax+8] ;. .

when changed to this is slightly faster.
        fld y

fld st
fsub x
fld fpc(100.0)
fsubrp st(2),st
fdivr
fmul w
fstp ans


And I decided to go for the one point for being first with the dialog question. :tongue:
Posted on 2002-02-10 13:10:46 by Eóin
E?in scores additional 4 scores and becomes a leader with
9 scores!

May be we should give even easyer tasks?
Begginers should be envolve at least having chance to score
"the first" score.

I'm surpised that even given task weren't solve but many programmers :)

So I think if we want to rise up avarage level we mignt forget about college level tasks :)
I was even more right about avarage math level than I thougt.

But we shall overcome, some day :)
Posted on 2002-02-10 14:02:04 by The Svin