11298  Dissecting a Hexagon
Moderator: Board moderators
11298  Dissecting a Hexagon
Am i right?
If we can divede hexagon into k parallelograms. We can divide it into k+1 parallelograms by cuting any one parallelogram into 2 parallelograms for exapmle by middle.
According to the input we can't divide hexagon in 2 parallelograms, but we can divite into 3.
So:
if (n >= 3) answer is 1
else answer is 0
If we can divede hexagon into k parallelograms. We can divide it into k+1 parallelograms by cuting any one parallelogram into 2 parallelograms for exapmle by middle.
According to the input we can't divide hexagon in 2 parallelograms, but we can divite into 3.
So:
if (n >= 3) answer is 1
else answer is 0

 Experienced poster
 Posts: 196
 Joined: Wed May 02, 2007 10:12 pm
 Location: Hungary, Pest county, Halasztelek
 Contact:
Re: 11298 Dissecting a Hexagon
Replace the word parallelogram by rhombus!Lomir wrote:Am i right?
If we can divede hexagon into k parallelograms. We can divide it into k+1 parallelograms by cuting any one parallelogram into 2 parallelograms for exapmle by middle.
According to the input we can't divide hexagon in 2 parallelograms, but we can divite into 3.
So:
if (n >= 3) answer is 1
else answer is 0
It is a very sad thing that they can't provide a contest without errors. I've sent a clarification email about 9 hours ago but there was no answer.
It's much more general than just Rhombus.
The precise wording should be
Somehow my problem tester just assumed this as I did.
Sorry about this. Unfortunately, I did not get the password to post on the clarification board in time.
The precise wording should be
Code: Select all
divide into n parallelograms of equal area.
Sorry about this. Unfortunately, I did not get the password to post on the clarification board in time.
Are they parellelograms or rhombus? I honestly find your post confusing
EDIT: I got AC considering Parellelograms not neccesarily Rhombus, so forget the word Rhombus! Moreover there is a test case with n <= 0, could anybody explain me why there are such stupid cases?
EDIT: I got AC considering Parellelograms not neccesarily Rhombus, so forget the word Rhombus! Moreover there is a test case with n <= 0, could anybody explain me why there are such stupid cases?
Last edited by luishhh on Sun Sep 30, 2007 11:34 pm, edited 1 time in total.
"From lost to the river" > Spanish quote
According to the probmes statement i can find any parallelograms. Please fix it.baodog wrote:Both interpretations (although different).
lead you to the same output as the judge:
1) n Parallelogram, each with all sides equal.
2) n Parallelograms with equal area.
P.S. Solved different size rombus problem... Now will try once again to solve it...
I got AC using the second hypothesis. So, if both are equivalent in this problem, please tell me how to dissect a hexagon in 6 rhombus with all equal sides, I don't find the solution.1) n Parallelogram, each with all sides equal.
2) n Parallelograms with equal area.
"From lost to the river" > Spanish quote

 Experienced poster
 Posts: 196
 Joined: Wed May 02, 2007 10:12 pm
 Location: Hungary, Pest county, Halasztelek
 Contact:
That's good, but remember that in this problem:
And remove your spoiler!
Code: Select all
yes=1
no=0
There is a test case
I don't know why but I finally got AC after taking care of this exception.
So the matter is that there is no way of dissecting an hexagon in 0 parallelograms ...
Code: Select all
Input
0
Output
0
So the matter is that there is no way of dissecting an hexagon in 0 parallelograms ...
Last edited by jah on Mon Oct 01, 2007 7:46 pm, edited 1 time in total.
This task is sooo stupid There are some invalid characters other than spaces and digits, probably tabs. If you use PASCAL, you will need some special routines to parse the input (otherwise you get Runtime Error with no apparent reason). But if you use C or C++, you will not face any problem using scanf. This is pretty unfair.