## 10481 - The Gift Wrappers of Hollywood

Moderator: Board moderators

ditrix
New poster
Posts: 33
Joined: Sat Mar 01, 2003 12:38 am
Location: Paris

### 10481 - The Gift Wrappers of Hollywood

Hi!
I haven't got AC, so wether you have or not I would like to see your factors.
My computations gives such values:

Code: Select all

``````0.9805979290912715916
1.4845015099848237750
``````
@+!
DitriX

Alexander Grushetsky
New poster
Posts: 28
Joined: Wed Jul 31, 2002 10:33 am
Location: Ukraine
Contact:
Your factors are correct up to 16 digits after dot. But did you notice that input is area of triangle (or volume with height 1), not the length of its side? I did this mistake at first.

I'm very upset about this problem. It is clear that problem description was made to confuse people. I've solved a lot of these problems before and everywhere L was length. They should at least mark it as V. My dictionary translates volume also as "proportions" or "scale", so I didn't pay attention to this word. And it is unfair to give roots of sqrt(3)/4*L^2=L as examples. The hardest should be to solve the problem, not to find tricks. And test input should approve that you understood problem correctly.

However, it is a very good lesson, that it is always important to read description carefully.

Andrey Mokhov
Experienced poster
Posts: 128
Joined: Fri Nov 15, 2002 7:45 am
Location: Kyrgyzstan
Thank you, Alexander.

I tried a lot at the contest but only WA. I also solved a lot of such problems (all but 10402 - which is either very hard or has judge errors)and didn't expect such an 'offensive' trick.

Now I'll pay more attention on the input values. It seemed to be a strange value, but...

Thanks you again,
Andrey.

mathijs
New poster
Posts: 7
Joined: Tue Mar 04, 2003 5:15 pm
Location: Groningen, The Netherlands
Contact:
I think this kind of problems don't belong in a programming contest. It's just finding a mathematical formula and then writing a 10-line program to implement it. It doesn't have anything to do with clever programming or problem solving, just mathematics...
I'm curious about other people's opinions.

Learning poster
Posts: 57
Joined: Sun Sep 29, 2002 12:00 pm
Location: in front of the monitor :-)
Contact:
hello there.

this is not about this particular problem, it is about this kind of problem. personally, i like this kind of problems (not that i am good at solving these problems). it requires quite good and clear knowledge of geometry and often involves solving equations (if you successfully manage to find any, which i find rather difficult) using some sort of numerical method. math itself, and numerical method are parts of computer science. so i dont see any harm in putting this kind of problems in a programming contest.

ditrix
New poster
Posts: 33
Joined: Sat Mar 01, 2003 12:38 am
Location: Paris
Snicky trick! It was a good lesson for me, cause I always forget to read the text. But this time I have read the problem statement specialy for find the trick, but it was made for nobody understand it! Snicky...
@+!
DitriX

shahriar_manzoor
Posts: 399
Joined: Sat Jan 12, 2002 2:00 am

### Hmm

Actually,
This site is a practice center for all form of programming contest, not only ACM/ICPC. Ofcourse our main focus in on ACM/ICPC. So we try to add all types of problems here which enable people to think. The first picture of 10481 can be solved with simple geometry considering that the perpendicular drawn from peak upon the base of any of the triangles is actually along the radius. But this is not told anywhere in the problem statement. So the ideal way is to solve it with two binary search or other numerical method. So in that sense it is not a program of 5/6 lines.

About the trick yes I also admit it was not right to mark volume with the letter L, however the other part of the trick seems OK with me

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

### Help..

Hi everybody.

I try to solve this task, but got WA all the time...

Here're my "factors". I calculate them w/ bisection method:

Code: Select all

``````r4 = 0.9805979...
r11 = 1.4845015...``````
Knowing that L refers to the area, I get the length of each side by the formula:[pascal]d := 2.0*sqrt(L/sqrt(3.0));[/pascal]What have I done wrong? Somebody please help and tell me what to do!!!

Here's the main part of my latest code: [pascal]...
for i := 1 to n do begin
d := 2.0*sqrt(L/sqrt(3.0));
writeln('Case ',i,': ',d*r4:0:12,' ',d*r11:0:12);
end;
end.[/pascal]
And a simple test case:
Input:

Code: Select all

``````3
0
1
2.30940107``````
Output:

Code: Select all

``````Case 1: 0.000000000000 0.000000000000
Case 2: 1.490186599599 2.255954445380
Case 3: 2.264593909997 3.428309380592``````
P.S. I see that there are no Accepted Pascal solutions till now. Is there something wrong with the special corrector?

Or have I overlooked sth obvious.......?????? Plz tell me~
Last edited by Observer on Tue May 11, 2004 5:28 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

Observer
Guru
Posts: 570
Joined: Sat May 10, 2003 4:20 am
Location: Hong Kong
Well, since there are no replies, it must be either:
1) my code has an obvious bug which is not worth mentioning ; or
2) there exists some bugs that are hard to be removed ...

Anyway, any help is appreciated! (Hope that my program isn't too wrong)
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org

Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany
It seems you have to print a blank line after each test case to get Accepted.
If I remember it right, there was a clarification saying this in the online contest, but it never found its way into the problem description.

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

( Stupid judge )
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org

little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm
Well, that turned my WA into AC immediately.

Observer
Guru
Posts: 570
Joined: Sat May 10, 2003 4:20 am
Location: Hong Kong
little joey wrote:Well, that turned my WA into AC immediately.
How can we notify the system adminz of this issue?
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org

little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm
Yuo could write an email to problemset@acm.uva.es. But the judges are very 'busy'. My previous mail from some months ago is still 'pending'...