10519 - !! Really Strange !!

All about problems in Volume 105. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Observer
Guru
Posts: 570
Joined: Sat May 10, 2003 4:20 am
Location: Hong Kong

10519 - !! Really Strange !!

Post 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!
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org

Eric
Learning poster
Posts: 83
Joined: Wed Sep 11, 2002 6:28 pm
Location: Hong Kong

Post 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.
Last edited by Eric on Sat Jan 31, 2004 6:32 am, edited 1 time in total.

Observer
Guru
Posts: 570
Joined: Sat May 10, 2003 4:20 am
Location: Hong Kong

Post 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!!!
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org

Eric
Learning poster
Posts: 83
Joined: Wed Sep 11, 2002 6:28 pm
Location: Hong Kong

Post by Eric »

No, I hardcode the answer to be 1.

hujialie
New poster
Posts: 43
Joined: Thu Apr 17, 2003 10:24 am
Location: Shanghai,China

Post by hujialie »

To Eric:
I used the same formula and got Accepted.
Check your programme of BigInteger more carefully.
Retired from SJTU Accelerator 2004

Eric
Learning poster
Posts: 83
Joined: Wed Sep 11, 2002 6:28 pm
Location: Hong Kong

Post 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]
Last edited by Eric on Sat Jan 31, 2004 6:31 am, edited 1 time in total.

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

Post by Dominik Michniewski »

Could anyone explain me what is way to generate this formula?
f(n) = n^2 - n + 2 ?

Best reagrds
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)

anupam
A great helper
Posts: 405
Joined: Wed Aug 28, 2002 6:45 pm
Contact:

Post 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..
"Everything should be made simple, but not always simpler"

anupam
A great helper
Posts: 405
Joined: Wed Aug 28, 2002 6:45 pm
Contact:

Post by anupam »


yes it requires Bigint
"Everything should be made simple, but not always simpler"

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

Post 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
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)

shamim
A great helper
Posts: 498
Joined: Mon Dec 30, 2002 10:10 am
Location: Bozeman, Montana, USA

How are we suppose to know

Post by shamim »

The problem setters should have clarified the part about BigInt. :evil:
They can not expect us to guess.

Moni
Experienced poster
Posts: 202
Joined: Fri Mar 22, 2002 2:00 am
Location: Chittagong. CSE - CUET
Contact:

Re: How are we suppose to know

Post 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 :)
ImageWe are all in a circular way, no advances, only moving and moving!

Moni
Experienced poster
Posts: 202
Joined: Fri Mar 22, 2002 2:00 am
Location: Chittagong. CSE - CUET
Contact:

Post 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:
ImageWe are all in a circular way, no advances, only moving and moving!

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

Post 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
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)

soyoja
Experienced poster
Posts: 106
Joined: Sun Feb 17, 2002 2:00 am
Location: Seoul, South Korea
Contact:

10519 Very Strange... Key formula...

Post 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?
Last edited by soyoja on Mon Aug 25, 2003 4:19 am, edited 1 time in total.

Post Reply

Return to “Volume 105 (10500-10599)”