Page 1 of 3

10519 - !! Really Strange !!

Posted: Thu Jul 03, 2003 6:40 am
by Observer
During contest this qq requires BigInteger.

Is it still true?? Plz tell!

P.S. I don't understand why I got WA during contest, but ACC now without any modification!

*************************************************

OK. I've sent ~20 versions for 10519 to the judge and can conclude that:
1. Yes, BigInteger is a MUST!
2. I/o limit : Less than 200 digits.

Thx for your attention!

Posted: Thu Jul 03, 2003 9:04 am
by Eric
I use the formula " --removed-- " but get WA.
Can anyone help me?

The formula is removed to save the interest of the problem.

Posted: Thu Jul 03, 2003 9:10 am
by Observer
One special case:

What if there are NO circles in the rectangle? An incorrect program will probably output "2", which is clearly wrong!!!

Posted: Thu Jul 03, 2003 10:20 am
by Eric
No, I hardcode the answer to be 1.

Posted: Thu Jul 03, 2003 10:25 am
by hujialie
To Eric:
I used the same formula and got Accepted.
Check your programme of BigInteger more carefully.

Posted: Thu Jul 03, 2003 12:46 pm
by Eric
Since I get WA in 485, which is also a BigInt problem.
I wonder if my BigInt code is correct.
Can anyone please check my code?
[pascal --Cut--[/pascal]

Posted: Thu Jul 03, 2003 1:04 pm
by Dominik Michniewski
Could anyone explain me what is way to generate this formula?
f(n) = n^2 - n + 2 ?

Best reagrds
DM

Posted: Thu Jul 03, 2003 4:21 pm
by anupam

I request you not to submit the problem.
because the online judge has put the incorrect(without the correction during the contest) problems there.
I mailed them. i think they will fix them very soon.
So please wait and sorry for the mistake..

Posted: Fri Jul 04, 2003 8:52 am
by anupam

yes it requires Bigint

Posted: Fri Jul 04, 2003 11:29 am
by Dominik Michniewski
I have one question:
if inpt looks like 10 100
I should or shouldn't use GCD on this values?
I know that 10/100 = 1 / 10 but 10/100 has other CF form that 1/10 .... (one level more if I correct remmber) ... So can I reduce or not ? Could anyone tell me ?

Best regards
DM

How are we suppose to know

Posted: Sat Jul 05, 2003 4:45 pm
by shamim
The problem setters should have clarified the part about BigInt. :evil:
They can not expect us to guess.

Re: How are we suppose to know

Posted: Sat Jul 05, 2003 5:56 pm
by Moni
shamim wrote:The problem setters should have clarified the part about BigInt. :evil:
They can not expect us to guess.
Shamim! Don't be so angry with them :) They are all at your service !!! ;)

Yeap! But during the contest the Clarification was given in the board Real time clarification didn't see then..........OK!

Everybody didn't there at that time................!

Give them time to make up all the things as soon as possible :)

Posted: Sat Jul 05, 2003 6:00 pm
by Moni
Dominik Michniewski wrote:I have one question:
if inpt looks like 10 100
I should or shouldn't use GCD on this values?
I know that 10/100 = 1 / 10 but 10/100 has other CF form that 1/10 .... (one level more if I correct remmber) ... So can I reduce or not ? Could anyone tell me ?

Best regards
DM
Will you tell me is this for the "Continiously Growing Fractions" or not ??? :roll:

Posted: Mon Jul 07, 2003 8:29 am
by Dominik Michniewski
Yes, it is for this problem (Continously Growing Fractions).
But never mind - I found mistake in my code and now this question looks stupid :oops:

Best regards
DM

10519 Very Strange... Key formula...

Posted: Mon Jul 21, 2003 11:47 am
by soyoja
I read previous article that the key formula for solving this problem is

"f(n) = n^2 - n + 2 ".

But I'm very anxious how can generate this formula....

Could anyone explain this principle?