Lord_Farin, thanks for the explanation. I am somehow still not convinced. Put it differently two solid objects can occupy the same point as per this definition if they are adjacent.Lord_Farin wrote:You may want to notice that the volume of a cuboid is not the same as the amount of lattice points contained in it. That is what led to your confusion, I believe. Since planes have volume zero in 3D, it does not matter if we include the boundary of the cuboid or not: the volume stays the same.
Problem 212
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
-
sivakd
- Posts: 217
- Joined: Fri Jul 17, 2009 9:37 am
- Location: California, USA
- Contact:
Re: Problem 212

puzzle is a euphemism for lack of clarity
-
TripleM
- Posts: 384
- Joined: Fri Sep 12, 2008 3:31 am
Re: Problem 212
Sure they can - there is a lot of overlapping of cuboids in this problem, which is the point (to calculate the volume of the union). The problem doesn't say the cuboids can't share points (in fact, if they couldn't, the problem would be trivial, since you'd just add the volumes of each cuboid).
If you were asked to draw a lot of squares on a piece of paper then calculate the area of the union, it doesn't make a difference whether you include the edges or not - the area is the same. And there will definitely be squares sharing the same points. Exactly the same here, but with cuboids.
If you were asked to draw a lot of squares on a piece of paper then calculate the area of the union, it doesn't make a difference whether you include the edges or not - the area is the same. And there will definitely be squares sharing the same points. Exactly the same here, but with cuboids.
-
sivakd
- Posts: 217
- Joined: Fri Jul 17, 2009 9:37 am
- Location: California, USA
- Contact:
Re: Problem 212
Thanks Guys, working on a problem till late into the night can make you dumb
.

puzzle is a euphemism for lack of clarity
-
OskarS
- Posts: 6
- Joined: Tue Nov 01, 2011 11:17 pm
Re: Problem 212
I've figured out an algorithm for this problem, and the code I wrote gives the correct answer for n=100 and for n=1579 that was provided earlier in this thread, but it gives the wrong answer for the full n=50000 problem. Could I message someone here with some other values, just to see if I can figure out where I'm going wrong?
-
OskarS
- Posts: 6
- Joined: Tue Nov 01, 2011 11:17 pm