3658 - Triangle

Discussion around the problems of the COJ.
Forum rules
Remember that posting AC code is not allowed here. If you are going to ask a question or to post a solution, describe your algorithm instead. Posting AC code will be penalized.
Post Reply
User avatar
ymondelo20
Posts: 1968
Joined: 7 years ago
Location: Universidad de las Ciencias Informáticas
Gender: None specified
Contact:

3658 - Triangle

Post by ymondelo20 » 2 years ago



"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

User avatar
ymondelo20
Posts: 1968
Joined: 7 years ago
Location: Universidad de las Ciencias Informáticas
Gender: None specified
Contact:

Re: 3658 - Triangle

Post by ymondelo20 » 2 years ago

Why sample #2 has output NO ???

From what I understand, with a rectangle of sides 6 and 7 it´s possible to produce two triangles of side lengths 3, 4 and 6... by cutting the rectangle with a line segment over sides with length 7, producing two sides of length 3 and two of length 4.
"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

User avatar
alurquiza
Posts: 54
Joined: 3 years ago
Gender: Male

Re: 3658 - Triangle

Post by alurquiza » 2 years ago

El problema es que solo puedes trazar una linea, y para que con una linea te queden dos triangulos tienes que picar solo por la diagonal.

User avatar
ymondelo20
Posts: 1968
Joined: 7 years ago
Location: Universidad de las Ciencias Informáticas
Gender: None specified
Contact:

Re: 3658 - Triangle

Post by ymondelo20 » 2 years ago

Entonces, esto no debería formar parte del enunciado "and freely rotating and flipping the resulting pieces". Pues en realidad, nada se rota ni se intercambia; los triángulos quedan formados con el corte y listo. Es algo confuso, me gusta más la idea de como lo entendí primeramente jaja.
"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

Post Reply

Return to “Problem set”