Submit | All submissions | Best solutions | Back to list |
BOGGLE - Boggle Scoring |
In Boggle, you win points for words you find on the board which no other player finds. If another player finds the same word as you, neither player gets points for that word.
For words of 4 or fewer letters, 1 point is awarded. 5-letter words are worth 2 points, 6-letter words are worth 3 points, 7-letter words are worth 5 points, and words longer than 7 letters are worth 11 points.
Given the set of words that some boggle players found, determine the score of the winner.
Input
The first line is the number of players (at most 100).
Each subsequent line is the space-separated list of no more than than 50 words each no more than 50 characters (ASCII 33-126) that player found.
Output
The score of the winning player.
Sample
Input 2 one two three two three four Output 1
Input 3 good dual strange stranger would dual would duality dregs gnaw dual gnaw draw would student Output 17
Input 2 grid grades dread bread thread threads grid grids grade brood broods thread threads Output 9
Added by: | Ben Dilts |
Date: | 2012-10-12 |
Time limit: | 9.479s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
hide comments
|
||||||
2013-11-30 07:45:37 Saimadhav Heblikar
AC in first attempt :) |
||||||
2013-10-20 07:29:41 Aswin Murugesh
Easy one in Python :) |
||||||
2013-09-13 18:45:22 sharad gupta
can anyone some test cases |
||||||
2013-07-16 11:20:45 BLANKRK
wow!!! got AC in fst attmpt... :P |
||||||
2013-06-17 04:00:33 Prikshit Kumar
How come the answer for 2nd test case is 17? I am able to get only 6(2 bcoz of dual and 4 bcoz of would ). |
||||||
2013-04-03 13:12:11 Monkey D. Luffy
time limit not strict |
||||||
2012-12-30 16:07:01 Just Trying
@Divanshu I m also using getchar() my solution is give correct on my machine but giving wrong ans here.. Last edit: 2012-12-30 16:07:30 |
||||||
2012-12-28 12:17:38 !(loGic)
@Ben Dilts: Can u pls tell..for which case my code fails...ID :8364243 Continsly geting WA...:| |
||||||
2012-12-23 16:43:00 Divanshu
What is the constraint for words/player ? And, bad input formatting. Take care using 'getchar()' in C/C++. EDIT: Problem statement modified. Last edit: 2012-12-23 16:41:53 |
||||||
2012-12-23 16:43:00 (Tjandra Satria Gunawan)(曾毅昆)
suddenly I know how to solve this problem efficiently ;-) |