Assuming that the roots of $x^3 + p \cdot x^2 + q \cdot x + r = 0$ are real and positive, find a relation between $p,q$ and $r$ which gives a necessary condition for the roots to be exactly the cosines of the three angles of a triangle.
1. Let \( a, b, \) and \( c \) be the roots of the polynomial \( x^3 + p \cdot x^2 + q \cdot x + r = 0 \). According to Vieta's formulas, we have:
   \[
   a + b + c = -p,
   \]
   \[
   ab + bc + ca = q,
   \]
   \[
   abc = -r.
   \]

2. Given that \( a, b, \) and \( c \) are the cosines of the angles of a triangle, we use the known trigonometric identity for the cosines of the angles of a triangle:
   \[
   a^2 + b^2 + c^2 + 2abc = 1.
   \]

3. Substitute the expressions from Vieta's formulas into the identity:
   \[
   a^2 + b^2 + c^2 + 2abc = 1.
   \]

4. Using the identity \( (a + b + c)^2 = a^2 + b^2 + c^2 + 2(ab + bc + ca) \), we can express \( a^2 + b^2 + c^2 \) as:
   \[
   a^2 + b^2 + c^2 = (a + b + c)^2 - 2(ab + bc + ca).
   \]

5. Substitute \( a + b + c = -p \) and \( ab + bc + ca = q \) into the equation:
   \[
   a^2 + b^2 + c^2 = (-p)^2 - 2q = p^2 - 2q.
   \]

6. Now, substitute \( a^2 + b^2 + c^2 \) and \( 2abc = -2r \) into the identity:
   \[
   p^2 - 2q - 2r = 1.
   \]

7. Rearrange the equation to find the necessary condition:
   \[
   p^2 = 2q + 2r + 1.
   \]

8. Verify the necessity of the positivity condition. If \( a, b, \) and \( c \) are positive and less than 1, then \( 0 < a, b, c < 1 \). The inverse cosines \( \alpha = \arccos a \) and \( \beta = \arccos b \) are strictly between 0 and \( \frac{\pi}{2} \). Therefore, there exists a triangle with angles \( \alpha, \beta, \) and \( \gamma = \pi - \alpha - \beta \).

9. Since \( a^2 + b^2 < 1 \), it follows that \( \alpha + \beta > \frac{\pi}{2} \), and thus \( \gamma < \frac{\pi}{2} \). The cosine of \( \gamma \), \( x = \cos \gamma \), must be positive.

10. The quadratic equation for \( x \) is:
    \[
    x^2 + 2abx + (a^2 + b^2 - 1) = 0.
    \]

11. The roots of this equation have a product \( a^2 + b^2 - 1 \) and a sum \( -2ab \). Since \( a^2 + b^2 < 1 \), the product is negative, indicating that the roots have opposite signs. Therefore, \( x \) is the only positive solution, and \( c \) must be the cosine of the third angle.

12. The positivity condition is essential to ensure that \( a, b, \) and \( c \) are indeed the cosines of the angles of a triangle.

\(\blacksquare\)

The final answer is \( \boxed{ p^2 = 2q + 2r + 1 } \).