POI XIII Stage 3. Problem Crystals

某岛 at 
Brief description: 给定一个 n 个元素的数组 {ai}, 问存在多少组 {xi, xi……