1300 - Card

Time Limit : 10 Second

Memory Limit : 128 MB

Submission: 136

Solved: 15

Description
Today is Gaewah’s birthday, he invite many friends come to his home. For reception the friends, he bring out a pack of cards. This is a special deck of playing cards, that each card just has number without Spades, Hearts , Clubs, Diamond on the face. And there is no A,J,Q,K, but the number on the card can be 1..100. Now they want to play a game, that they alternative to get cards and hold 5 cards. The first one has five cards with sum of number on the card is 188 will won the game.
As the organiger of the game, Gaewah want to know how many situation will win in this deck, in other words, he want to know pick any 5 cards from the deck, how many times will the sum is 188.(if 1 card different, the combine of 5 cards are different)
Input
the first line has a number t indicate the case number.
For each case, the first line is a integer n indicate how many cards in the deck.(1<=N<=1000000).
Then a line with n integers, indicate each card’s number..
Output
For each case output a integer indicate the answer.
sample input
1
10
80 80 80 100 100 100 80 1 2 5
sample output
12
hint
source
Hust Monthly 09.08.21/Zehua HONG
© 2015 HUST ACMICPC TEAM. All Right Reserved.