Quadrilateral Check (quadrilateral)

144 teams scored 13240 points on this task, for a maximum score of 100, an average score of 92 and a median score of 100.

Highlights

  1. Banfi, Vimercate is the institute with the most points (570).
  2. Lombardia is the region with the most points (3040).

Statement

Alice has N wooden sticks. Their lengths are S_0, S_1, …, S_N-1, and all of them are integer numbers. Alice wants to choose four sticks so that she can create a quadrilateral with the sticks as sides of the quadrilateral (see the images below). Each stick has to correspond to one side, she cannot cut the sticks or combine two or more into one. The sticks have to be exactly as long as the side of the quadrilateral, they cannot be longer or shorter. Can you help her to create a quadrilateral from those sticks? It might not be possible to create a quadrilateral from the sticks, in this case your program should print "-1".