Re: Infinite precision floating-point




"Pascal Bourguignon" <pjb@xxxxxxxxxxxxxxxxx> wrote in message
news:87wtplhh74.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> "Geoffrey Summerhayes" <sRuEmMrOnVoEt@xxxxxxxxxxx> writes:
>
>>
>> http://online-judge.uva.es/p/v2/202.html
>>
>> Unfortunately, they only allow C, C++, Java, and Pascal
>> solutions to be submitted.
>>
>> Anyone have a solution that doesn't have an O(denominator)
>> space requirement? It's a *bit* of a hitch. ;-)
>
> Where's the challenge?
>

*solution snipped*

Challenge? It was probably the "gimme" in that years ACM contest.

But try removing the line, "None of the input integers exceeds 3000."
and make it work for arbitrarily large (bignum) rationals w/o running
into time/space constraints.

--
Geoff


.



Relevant Pages