Search found 108 matches

by Maarten
Tue Oct 21, 2003 4:17 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 38143

the situation can never occur... so you don't have to think about the result
by Maarten
Tue Oct 21, 2003 12:07 pm
Forum: Volume 105 (10500-10599)
Topic: 10522 - Height to Area
Replies: 32
Views: 15277

I'm getting WA too.. I think I took care of everything.. possibility that either height is zero. I assume negative height doesn't occur, I wouldn't know the meaning of it anyway. Can anybody help me? My program is here, I think it's pretty straighforward: [cpp]#include <stdio.h> #include <math.h> in...
by Maarten
Tue Oct 21, 2003 11:46 am
Forum: Volume 105 (10500-10599)
Topic: 10522 - Height to Area
Replies: 32
Views: 15277

did you consider the case where either one of a,b,c is equal to zero?
by Maarten
Mon Oct 20, 2003 12:02 am
Forum: Volume 104 (10400-10499)
Topic: 10443 - Rock
Replies: 26
Views: 3839

??? what do you mean ?
I tried to solve this problem (and in fact I did solve it), but my solution is rather slow (it runs in 3.6 seconds).
I am wondering if there is a faster way to solve the problem; what I did is just simulation
by Maarten
Fri Oct 17, 2003 3:48 pm
Forum: Volume 105 (10500-10599)
Topic: 10569 - Number Theory
Replies: 19
Views: 6989

Hi guys! Let me explain how we (I solved this problem with someone else) came up with those large numbers. At first, we didn't have a clue how to solve the problem, apart from just trying possibilities. So we looked up some facts about number theory and found the following: Theorem (Riley, 1825) Any...
by Maarten
Thu Oct 16, 2003 6:21 pm
Forum: Volume 105 (10500-10599)
Topic: 10573 - Geometry Paradox
Replies: 33
Views: 11900

i agree completely; i got accepted on my first submission as well, it's a very beautiful geometry problem. Actually I was very surprised to find out that the gray area can be calculated from t only
by Maarten
Thu Oct 16, 2003 11:49 am
Forum: Volume 1 (100-199)
Topic: 132 - Bumpy Objects
Replies: 38
Views: 4411

hmm... so the base line number should be right justified in a field of width 2... I can't find it anywhere in the problem description... :D
by Maarten
Thu Oct 16, 2003 11:44 am
Forum: Volume 1 (100-199)
Topic: 132 - Bumpy Objects
Replies: 38
Views: 4411

thanks guys! I finally got accepted. My program didn't handle correctly the case when there are only 2 different points, or when all points are collinear. Also, I forgot to take into account the fact that the base point has to be strictly above the base line. Well, I still got P.E. but that should b...
by Maarten
Wed Oct 15, 2003 11:56 pm
Forum: Volume 1 (100-199)
Topic: 132 - Bumpy Objects
Replies: 38
Views: 4411

How about these test cases? Object0 2 2 0 3 0 0 Object1 2 2 0 3 0 1 0 0 Object2 1 2 0 2 0 1 0 3 0 0 Square 2 2 1 1 3 1 3 3 1 3 2 1 3 2 2 3 1 2 0 0 Square2 10 10 1 1 3 1 3 3 1 3 2 1 3 2 2 3 1 2 0 0 # My program gives Object0 1001 Object1 2 Object2 3 Square 5 Square2 1001 Admittedly, the 1001 is a bit...
by Maarten
Wed Oct 15, 2003 11:36 pm
Forum: Volume 105 (10500-10599)
Topic: 10569 - Number Theory
Replies: 19
Views: 6989

hmm.. am not sure if i understand your second approach, are you trying to say we should solve the equation 3a_n(a_n + 1) + 1 = a_1^3 + ... + a_n^3 ? And then I don't get how we should choose those a_i.. should it be a_i = 2*i + 1 or a_i = 2*i + 2, or something different? It seems to me that if we ju...
by Maarten
Wed Oct 15, 2003 12:14 am
Forum: Volume 105 (10500-10599)
Topic: 10569 - Number Theory
Replies: 19
Views: 6989

yes.. I assume you mean n=7... see for example my post on this topic... apparantly we posted at exactly the same time :P
by Maarten
Tue Oct 14, 2003 11:59 pm
Forum: Volume 105 (10500-10599)
Topic: 10569 - Number Theory
Replies: 19
Views: 6989

10569 - Number Theory

For the input 30 1 .... 30 my program gives the output below. I checked with mathematica and the answers are correct. Why do I still get WA ?? Anyone please help me! Case 1: 1 1 Case 2: -1 0 0 Case 3: 42288400756279755000 41738316205970650321 9448388419029349679 12743419233793500000 Case 4: 10629385...
by Maarten
Tue Oct 14, 2003 11:31 am
Forum: Volume 1 (100-199)
Topic: 132 - Bumpy Objects
Replies: 38
Views: 4411

Hmm... I corrected the mistake but still WA... It's time to post my code here, I hope anyone can spot the mistake here, i really don't know it anymore. For your reference: My algorithm is: read in points, calculate convex hull, and then scan through the convex hull to check if the center of mass is ...
by Maarten
Tue Oct 14, 2003 9:38 am
Forum: Volume 1 (100-199)
Topic: 132 - Bumpy Objects
Replies: 38
Views: 4411

thanks! i think i know what is wrong with my code:
A base line, and its associated stable position, is identified by the highest numbered vertex touched by that line.
I didn't notice the word "TOUCHED"....
by Maarten
Mon Oct 13, 2003 11:11 pm
Forum: Volume 1 (100-199)
Topic: 132 - Bumpy Objects
Replies: 38
Views: 4411

i found the test input somewhere on the web, together with the output. My program gave 16 which was not the same as the 8 in the output

Go to advanced search