You work in a workshop which makes garden instruments from metal. At the end of each working day there remains a pile of scrap metal that cannot be used to make anything useful. Because you dislike the idea of throwing things away (even scrap metal), you decide to utilize this metal to make some triangular picture frames that can be sold at the local market.
Given a int[] pieces where each element represents the length of a straight metallic piece, return the number of possible different picture frames that can be made from those pieces. Two picture frames are considered to be identical if each of their corresponding sides is equal in length. If no picture frames can be created from pieces then return 0.
|