Codeforces Beta Round 24

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
24 Codeforces Beta Round 24 FINISHED False 7200 496169980 July 26, 2010, 1 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 2625 ) D Broken robot PROGRAMMING dp probabilities 2400

You received as a gift a very clever robot walking on a rectangular board. Unfortunately, you understood that it is broken and behaves rather strangely (randomly). The board consists of N rows and M columns of cells. The robot is initially at some cell on the i-th row and the j-th column. Then at every step the robot could go to some another cell. The aim is to go to the bottommost (N-th) row. The robot can stay at it's current cell, move to the left, move to the right, or move to the cell below the current. If the robot is in the leftmost column it cannot move to the left, and if it is in the rightmost column it cannot move to the right. At every step all possible moves are equally probable. Return the expected number of step to reach the bottommost row. On the first line you will be given two space separated integers N and M (1 ≤ N, M ≤ 1000). On the second line you will be given another two space separated integers i and j (1 ≤ i ≤ N, 1 ≤ j ≤ M) -- the number of the initial row and the number of the initial column. Note that, (1, 1) is the upper left corner of the board and (N, M) is the bottom right corner. Output the expected number of steps on a line of itself with at least 4 digits after the decimal point.

Tutorials

Codeforces Beta Round #24 solutions

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
103377 LayCurse D July 26, 2010, 2:38 p.m. OK GNU C TESTS 40 1720 11059200 2400
103840 Oleg D July 26, 2010, 2:53 p.m. OK GNU C++ TESTS 40 50 1331200 2400
102785 mrc88 D July 26, 2010, 2:16 p.m. OK GNU C++ TESTS 40 50 5529600 2400
103279 kalq D July 26, 2010, 2:34 p.m. OK GNU C++ TESTS 40 60 9420800 2400
102594 gawry D July 26, 2010, 2:09 p.m. OK GNU C++ TESTS 40 60 9523200 2400
103770 SuBaRaSi D July 26, 2010, 2:51 p.m. OK GNU C++ TESTS 40 80 1331200 2400
102339 iwiwi D July 26, 2010, 2 p.m. OK GNU C++ TESTS 40 80 9523200 2400
103210 Romka D July 26, 2010, 2:31 p.m. OK GNU C++ TESTS 40 90 13619200 2400
102409 natalia D July 26, 2010, 2:03 p.m. OK GNU C++ TESTS 40 90 13619200 2400
102650 jaaro D July 26, 2010, 2:11 p.m. OK GNU C++ TESTS 40 130 1433600 2400
103949 x-ray D July 26, 2010, 2:56 p.m. OK GNU C++ TESTS 40 160 13516800 2400
102835 Egor D July 26, 2010, 2:18 p.m. OK Java 6 TESTS 40 90 43008000 2400
102601 Thekid D July 26, 2010, 2:09 p.m. OK Java 6 TESTS 40 110 43008000 2400
102474 wata D July 26, 2010, 2:05 p.m. OK Java 6 TESTS 40 110 43008000 2400
103620 fetetriste D July 26, 2010, 2:46 p.m. OK Java 6 TESTS 40 750 42905600 2400
103155 Anton_Lunyov D July 26, 2010, 2:30 p.m. OK MS C++ TESTS 40 50 1331200 2400
103303 sdya D July 26, 2010, 2:35 p.m. OK MS C++ TESTS 40 50 1433600 2400
103245 Seyaua D July 26, 2010, 2:33 p.m. OK MS C++ TESTS 40 50 1433600 2400
103759 Jaan D July 26, 2010, 2:50 p.m. OK MS C++ TESTS 40 50 9420800 2400
102191 dzhulgakov D July 26, 2010, 1:54 p.m. OK MS C++ TESTS 40 60 1433600 2400
103726 pes D July 26, 2010, 2:49 p.m. OK MS C++ TESTS 40 60 9420800 2400
102372 balakrishnan D July 26, 2010, 2:01 p.m. OK MS C++ TESTS 40 60 25497600 2400
103429 Lepetrandr D July 26, 2010, 2:40 p.m. OK MS C++ TESTS 40 80 1433600 2400
102580 Ripatti D July 26, 2010, 2:08 p.m. OK MS C++ TESTS 40 110 18124800 2400
102610 stgatilov D July 26, 2010, 2:09 p.m. OK MS C++ TESTS 40 950 18124800 2400

remove filters

Back to search problems