## 10499 - The Land of Justice

Moderator: Board moderators

Pier
New poster
Posts: 38
Joined: Thu Mar 27, 2003 9:12 pm
Location: Aguascalientes, Mexico
Contact:

### 10499 - The Land of Justice

I don't quite understand this problem. For what I understood, the answer should always be 50%!

Thanks!
There are 10 kind of people on this world: those who understand binary and those who don't!

turuthok
Experienced poster
Posts: 193
Joined: Thu Sep 19, 2002 6:39 am
Location: Indonesia
Contact:
You misunderstood the problem ...

You have to find the initial-cost of the whole sphere using a very well-known formula.

Then, since we divide it into n parts, the sell-value will be n x sell-value of each part. The sell-value of each part is also pretty obvious, just be careful on certain input(s).

Now since you got sell-value of the sphere and also the initial-cost ... then it's easy to find the profit. If you're on the right track, you will come down to a very very simple formula ...

-turuthok-
The fear of the LORD is the beginning of knowledge (Proverbs 1:7).

Almost Human
Learning poster
Posts: 93
Joined: Sun Jan 12, 2003 3:30 pm

### 10499 - The Land of Justice

Is my formula correct.... ?

output = n / 4 ;

where n is number of piece ...

turuthok
Experienced poster
Posts: 193
Joined: Thu Sep 19, 2002 6:39 am
Location: Indonesia
Contact:
My AC-ed solution didn't use that formula ... and I had to make one special case for one input.

-turuthok-
The fear of the LORD is the beginning of knowledge (Proverbs 1:7).

Almost Human
Learning poster
Posts: 93
Joined: Sun Jan 12, 2003 3:30 pm
what kind of input is it ... ???

thx a lot ....

is my formula correct, actualy ... ?

eloha
New poster
Posts: 38
Joined: Thu Oct 31, 2002 8:24 am
Location: Taiwan
Can anyone tell me what the problem is talking about?

Thanks.

Observer
Guru
Posts: 570
Joined: Sat May 10, 2003 4:20 am
Location: Hong Kong
http://acm.uva.es/board/viewtopic.php?t ... ight=10499

When talking about "dividing the sphere", consider the top view......
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org

Faizur
New poster
Posts: 39
Joined: Fri Jun 06, 2003 3:04 pm
i also got wrong answer in 10499???
pls help....
Last edited by Faizur on Sat Jun 21, 2003 8:14 pm, edited 1 time in total.

Observer
Guru
Posts: 570
Joined: Sat May 10, 2003 4:20 am
Location: Hong Kong
Mind the variable type you use...

Recall that 0 < N < 2^31

P.S. Remove your formula above, plz...
Last edited by Observer on Sat Jun 21, 2003 11:11 am, edited 1 time in total.
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org

Dmytro Chernysh
Experienced poster
Posts: 146
Joined: Sat Apr 26, 2003 2:51 am
The formula is correct.
But be very careful with that. Use long long in C and extended in Pascal.

Faizur
New poster
Posts: 39
Joined: Fri Jun 06, 2003 3:04 pm
At last i get it accepted .
Thanx all for help.....

bery olivier
Learning poster
Posts: 90
Joined: Sat Feb 15, 2003 1:39 am
Location: Paris, France
Contact:

### 10499 : the land of justice

i tried to solve the problem 10499 too many times. I'm gonna be very angry.

I think I got the right formula and I tested different things like handle the 100% output and over things.

Can anyone give me a hint please ?
Not AC yet AC at last

shamim
A great helper
Posts: 498
Joined: Mon Dec 30, 2002 10:10 am
Location: Bozeman, Montana, USA
Explain the method you used, or submit the portion of your code that generates the answer. Then I may be able to help.

bery olivier
Learning poster
Posts: 90
Joined: Sat Feb 15, 2003 1:39 am
Location: Paris, France
Contact:
I use this formula :
Bad forumla, removed because it was so stupid
Last edited by bery olivier on Sat Nov 01, 2003 9:48 pm, edited 1 time in total.
Not AC yet AC at last

bery olivier
Learning poster
Posts: 90
Joined: Sat Feb 15, 2003 1:39 am
Location: Paris, France
Contact:
Ok, I guess I missundertood the problem. What is the meaning of the percentage requested ?
Not AC yet AC at last