10481 - The Gift Wrappers of Hollywood

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

Moderator: Board moderators

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

10481 - The Gift Wrappers of Hollywood

Post by ditrix »

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:

Post by Alexander Grushetsky »

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

Post by Andrey Mokhov »

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. :cry:

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

Thanks you again,
Andrey.
User avatar
mathijs
New poster
Posts: 7
Joined: Tue Mar 04, 2003 5:15 pm
Location: Groningen, The Netherlands
Contact:

Post by mathijs »

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.
Adil
Learning poster
Posts: 57
Joined: Sun Sep 29, 2002 12:00 pm
Location: in front of the monitor :-)
Contact:

Post by Adil »

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

Post by ditrix »

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
System administrator & Problemsetter
Posts: 399
Joined: Sat Jan 12, 2002 2:00 am

Hmm

Post by shahriar_manzoor »

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..

Post by Observer »

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]...
readln(n);
for i := 1 to n do begin
readln(L);
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

Post by Observer »

Well, since there are no replies, it must be either:
1) my code has an obvious bug which is not worth mentioning :D ; or
2) there exists some bugs that are hard to be removed :oops: ...

Anyway, any help is appreciated! :wink: (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
Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel »

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

Post by Observer »

Thanks Adrian! I've got Accepted!

( Stupid judge :-( ) 8)
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

Post by little joey »

Well, that turned my WA into AC immediately. :evil:
Observer
Guru
Posts: 570
Joined: Sat May 10, 2003 4:20 am
Location: Hong Kong

Post by Observer »

little joey wrote:Well, that turned my WA into AC immediately. :evil:
How can we notify the system adminz of this issue? :evil: :evil:
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

Post by little joey »

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'...
Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel »

I did it a long time ago. They changed judge output, but then the special corrector didn't work any more. And it seems to be too difficult to change the special corrector itself, I don't know why.
Perhaps the best thing is if someone of us will write a new special corrector, that accepts both ways: with blank line and without.
If I find time this week, I will try it.
Post Reply

Return to “Volume 104 (10400-10499)”