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
abdelkarim:
2013-08-07 22:57:53
trivial one ! |
|
btm:
2013-08-07 22:57:53
nice and very easy..
|
|
Mitch Schwartz:
2013-08-07 22:57:53
I hadn't read the problem until now. I'd say it's a tutorial problem, but maybe its presence in classical has been helpful to some beginners who had trouble with it. Tutorial/classical debates don't really interest me much; as far as points/ranking is concerned, in theory it's a moot point since an easy problem should get tons of solvers quickly and soon be worth hardly any points. I recommend that the problem setter move this to tutorial himself, I don't feel like moving it by force at this time.
|
|
Rocker3011:
2013-08-07 22:57:53
why does this problem stills in classical section?
|
|
Dragan MarkoviƦ:
2013-08-07 22:57:53
Trickier than it seems, you really need to know your language in order to solve it. |
|
vikash singh:
2013-08-07 22:57:53
my code is giving 'SIGSEGV'
|
|
ABHISHEK KUMAR:
2013-08-07 22:57:53
getting WA again & again ...please check submission id 9743094
|
|
Ouditchya Sinha:
2013-08-07 22:57:53
Easy! :)
|
|
nitish rao:
2013-08-07 22:57:53
One line of code in awk. \m/ \m/.
|
|
Haijun Deng:
2013-08-07 22:57:53
Easy? Got WA! Any trick cases?
|
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 |