AHP - After Hard Party
Dixon is a crazy programmer who keeps making parties every weekend, his parties are always crazy
and extreme, but he has noticed that people who attend are always the same every night, for this
Dixon has taken pictures of the festivities in order to know how many people attended each party.
The problem is that the photos taken out many arms and heads over and can not be identified at
a glance how many people are, Dixon is a great programmer but is very exhausted and can not
produce a program to help so need help.
These pictures are composed of the following characters "\", "/", "|", "0". "0" represents the head
and the other his arms, still people apply the following examples: "|0|", "/0/", "\0\", "\0/."
But remember that a person has arms themselves and these may sound stupid are unique to him.
You can calmly assume the following:
- No disabled attended the party.
- Because Dixon's friends are very funny, may be left over heads (false) and arms.
Input:
The first line will contain an integer 0 <= N <= 100 followed by N lines which contain a C string.
the string will contain 1 <= | C | <= 10 ^ 5 characters.
Output:
For each string should be printed on the amount of people present in the photograph,
not having anyone in the photograph is printed "That Bad Party xD".
Example:
Input:
3
||||||000|||||\0/0000|0|0000/0/||0|0|0|0
||||/0|||||
/0//0|0|\0\\
Output:
5
That Bad Party xD
3
hide comments
Mayank gupta:
2013-08-07 22:57:53
please move it to Tutorials.. too easy:)
|
|
Rocker3011:
2013-08-07 22:57:53
This problem is really easy :), however it is quite a nice one Last edit: 2013-07-30 07:55:58 |
Added by: | Raffaele Ranaldo |
Date: | 2013-07-26 |
Time limit: | 0.209s-1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Own Problem |