| | |
I need Help..plz Solve this problem!!!
Thread Solved |
•
•
Join Date: May 2008
Posts: 22
Reputation:
Solved Threads: 0
Recently, there was an international volleyball championship. Speaking of volleyball, we are interested in the probability of winning of one or another team, if we know some information about the teams. Here are the rules of the game and the necessary information:
the match is played by two teams: A and B;
the first team to win K games in a match, wins the match;
each game consists of rounds; each round is won by one of the teams, and the team adds one point to its score for the current game;
the first team to win L points in a game, wins the game;
if team A serves the ball in a round, it has Pa% chance to win the round (and (100-Pa)% to loose it);
if team B serves the ball in a round, it has Pb% chance to win the round (and (100-Pb)% to loose it);
if a round is not the first in a game, the ball in the round is served by the team that won the last round;
if a game is not the first in a match, the ball in the first round of the game is served by the team that did not served the ball in the first round of the previous game;
both teams have an equal chance to serve the ball in the first round of the very first game of a match.
So, for given values of Pa, Pb, K, and L, you have to compute the probability, as a percent, for team A to win the match.
Input
There is one number in the first line - the number of data sets. Each data set consists of a single line with four integers on it: Pa, Pb, K, and L (1 <= K <= 100, 1 <= L <= 100).
Output
For each test you must write on one line the required result with exactly one digit after the decimal point (the number should be rounded to the first digit after the decimal point).
Sample Input
2
100 50 1 3
100 1 1 1
Sample Output
93.8
99.5
Plz use simple programming im just a beginner if (simple) not possible then plz do it anyway!!
Thankyou very much!!!
the match is played by two teams: A and B;
the first team to win K games in a match, wins the match;
each game consists of rounds; each round is won by one of the teams, and the team adds one point to its score for the current game;
the first team to win L points in a game, wins the game;
if team A serves the ball in a round, it has Pa% chance to win the round (and (100-Pa)% to loose it);
if team B serves the ball in a round, it has Pb% chance to win the round (and (100-Pb)% to loose it);
if a round is not the first in a game, the ball in the round is served by the team that won the last round;
if a game is not the first in a match, the ball in the first round of the game is served by the team that did not served the ball in the first round of the previous game;
both teams have an equal chance to serve the ball in the first round of the very first game of a match.
So, for given values of Pa, Pb, K, and L, you have to compute the probability, as a percent, for team A to win the match.
Input
There is one number in the first line - the number of data sets. Each data set consists of a single line with four integers on it: Pa, Pb, K, and L (1 <= K <= 100, 1 <= L <= 100).
Output
For each test you must write on one line the required result with exactly one digit after the decimal point (the number should be rounded to the first digit after the decimal point).
Sample Input
2
100 50 1 3
100 1 1 1
Sample Output
93.8
99.5
Plz use simple programming im just a beginner if (simple) not possible then plz do it anyway!!
Thankyou very much!!!
A whole host of things crop up here:
1 - read the rules before posting, after which you might have discovered you need to
2 - post in the appropriate forum (this one is for saying hello only) and
3 - not expect people to answer your homework assignments for you when all you have done is copy the question, showing no work of your own
1 - read the rules before posting, after which you might have discovered you need to
2 - post in the appropriate forum (this one is for saying hello only) and
3 - not expect people to answer your homework assignments for you when all you have done is copy the question, showing no work of your own
Davey Winder
Information Security Journalist of the Year
www.happygeek.com
Follow me on Twitter: @happygeek
Information Security Journalist of the Year
www.happygeek.com
Follow me on Twitter: @happygeek
No, everyone deserves a second chance.
That said, his second chance posting was also in this thread, and also still asking for his homework to be done.
:-(
That said, his second chance posting was also in this thread, and also still asking for his homework to be done.
:-(
Davey Winder
Information Security Journalist of the Year
www.happygeek.com
Follow me on Twitter: @happygeek
Information Security Journalist of the Year
www.happygeek.com
Follow me on Twitter: @happygeek
![]() |
Similar Threads
- plz any one help me to solve this problem in c++ (C++)
- plz solve my problem of master pages (ASP.NET)
- Plz Verify this CODE........ (PHP)
- Plz Solve this problem... (C++)
- plz tell me how to solve problem (JSP)
- friend plz help me to solve this problem (C++)
- plz help me to connect more than one table in the ms access database to the asp.net (ASP.NET)
Other Threads in the Community Introductions Forum
- Previous Thread: New member: anxious to learn
- Next Thread: Hello
| Thread Tools | Search this Thread |
" "delete adsense aladar amatueurgrapicdesigner backlinks beginner business c# c#picturebox c++ champlain college contentwriting copywriter correspondence dba deleterectangle dheeraj experiences forensic forum givemetehcodez helloall internet internetmarketing introduction introductory itservices jauhari java lahore.civilengineer market marketing mca multiplerectangle naveen newbie newcomernote newgirl nigeria noob note oil online peertopeervideostreaming pekdi pictureboxselectobject prankerio profanitytest programmer projects research seo seoservices share shiva..... sqlserver stillnew student suthar tester traffic typhoon waliya'sgratituteandrequest. web webcam webdesign website welcomenote wllu wolf wordpresstheme






