AHP - After Hard Party

no tags 

 

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.

By the way, I suppose 58 bytes in Perl and 62 in AWK should be pretty close to the shortest possible.


(Raffaele)
It is a very easy problem.
I found it entertaining and fun, just as the movement to tutorial.
many thanks


(Mitch)
I've edited the comment because the way you had it, you made it look like your reply to me was something I wrote to you.

Last edit: 2013-08-17 19:14:14
Rocker3011: 2013-08-07 22:57:53

why does this problem stills in classical section?
re: it's a nice problem

Last edit: 2013-08-07 20:12:59
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'
please check id:9747921

Last edit: 2013-07-30 08:42:00
ABHISHEK KUMAR: 2013-08-07 22:57:53

getting WA again & again ...please check submission id 9743094

Last edit: 2013-07-29 12:08:15
Ouditchya Sinha: 2013-08-07 22:57:53

Easy! :)

@Raffaele:
It truly is a simple but fun problem, really do not understand why many say it is easy and when I see having 4-10 shipments disqualified in your account, this is not your case gj.

Last edit: 2013-07-29 15:45:43
nitish rao: 2013-08-07 22:57:53

One line of code in awk. \m/ \m/.

Edit: that is what i call an ownage


@Raffaele:
god job men xD

Last edit: 2013-07-28 22:10:04
Haijun Deng: 2013-08-07 22:57:53

Easy? Got WA! Any trick cases?
@Raffaele:
no

Last edit: 2013-07-28 22:10:47

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