#P1000. 六边形(a)

六边形(a)

Hexagon

Problem Description

Given the lengths of the six sides of a hexagon in clockwise order, where all six interior angles are 120120^{\circ}, find the number of equilateral triangles with side length of 11 that the hexagon can be divided into. Ensure that the hexagon can be divided into several equilateral triangles with side length of 11.

1 1 1 1 1 1
6
1 2 1 2 1 2
13
3 4 2 6 1 5
67

Data Range

Let the side lengths be a1...ana_1...a_n. For all data, 1ai10001\le a_i\le 1000.

Hints

Example 1: Example 2: Example 3: