Submit | All submissions | Best solutions | Back to list |
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
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 |
hide comments
|
|||||
2013-08-07 22:57:53 abdelkarim
trivial one ! |
|||||
2013-08-07 22:57:53 btm
nice and very easy.. |
|||||
2013-08-07 22:57:53 Mitch Schwartz
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 |
|||||
2013-08-07 22:57:53 Rocker3011
why does this problem stills in classical section? re: it's a nice problem Last edit: 2013-08-07 20:12:59 |
|||||
2013-08-07 22:57:53 Dragan MarkoviƦ
Trickier than it seems, you really need to know your language in order to solve it. |
|||||
2013-08-07 22:57:53 vikash singh
my code is giving 'SIGSEGV' please check id:9747921 Last edit: 2013-07-30 08:42:00 |
|||||
2013-08-07 22:57:53 ABHISHEK KUMAR
getting WA again & again ...please check submission id 9743094 Last edit: 2013-07-29 12:08:15 |
|||||
2013-08-07 22:57:53 Ouditchya Sinha
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 |
|||||
2013-08-07 22:57:53 nitish rao
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 |
|||||
2013-08-07 22:57:53 Haijun Deng
Easy? Got WA! Any trick cases? @Raffaele: no Last edit: 2013-07-28 22:10:47 |