Submit | All submissions | Best solutions | Back to list |
SUPOVR - Super Over |
An IPL match is going on between two teams and its a tie !!! So they decided to have a Super Over.
Rules of Super Over are as follows:
1) There has to be 6 valid balls.
2) If two wickets fall before 6 valid balls then team is considered all-out.
3) Wide and No-ball are not valid balls.
So, there are three batsmen b1, b2, b3. Initially b1 is playing (on strike) and b2 is at the other end (non-strike). If any one of them gets out, b3 replaces that batsmen.
At the end of the over, determine the number of runs scored by b1, b2 and b3 respectively.
Input
Input contains 1 line. Runs scored in every ball.
W stands for wide, N stands for No-ball and O stands for out.
Output
Output contains three lines. Each line contains runs scored by b1, b2 and b3 repectively.
Example
Input 1: 1 1 1 1 1 1 Output 1: 3
3
0
Input 2: 3 0 O O Output 2: 3
0
0
Added by: | Savan Popat |
Date: | 2013-09-19 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
hide comments
|
|||||
2014-01-02 09:52:49 Mostafa 36a2
@Martijn :) The Hell this game is "Cricket" An American Game suppose you're reading a problem written in Chinese :p . And yes I hate this kind of local problems -_- Last edit: 2013-11-02 13:40:48 |
|||||
2014-01-02 09:52:49 Martijn Muijsers
Please give us info on what the hell this game is and how it works. Also even when the game is understood there is seemingly still ambiguity. Very bad problem. |
|||||
2014-01-02 09:52:49 ggkjh
are we supposed to consider the case of wide and no ball ,runout,,,,?????plz some one reply .. Last edit: 2013-10-28 20:18:29 |
|||||
2014-01-02 09:52:49 Aditya Pande
give more test cases and remove the ambiguity by making the problem statement more detailed Last edit: 2013-10-28 16:49:48 |
|||||
2014-01-02 09:52:49 life
getting wrong answer after runcase 6 . please help |