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.
Problems
B"n fish, numbered from 1 to n, live in a lake. Every day right one pair of fish meet, and the probability of each other pair meeting is the same. If two fish with indexes i and j meet, the first will eat up the second with the probability aij, and the second will eat up the first with the probability aji xe2 x80 x89= xe2 x80 x891 xe2 x80 x89- xe2 x80 x89aij. The described process goes on until there are at least two fish in the lake. For each fish find out the probability that it will survive to be the last in the lake. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8918) -- the amount of fish in the lake. Then there follow n lines with n real numbers each -- matrix a. aij (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89aij xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891) -- the probability that fish with index i eats up fish with index j. It's guaranteed that the main diagonal contains zeros only, and for other elements the following is true: aij xe2 x80 x89= xe2 x80 x891 xe2 x80 x89- xe2 x80 x89aji. All real numbers are given with not more than 6 characters after the decimal point. Output n space-separated real numbers accurate to not less than 6 decimal places. Number with index i should be equal to the probability that fish with index i will survive to be the last in the lake."... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
71523 |
GennadiyChistyakov |
E |
June 3, 2010, 2:20 p.m. |
OK |
Delphi |
TESTS |
20 |
690 |
10956800 |
|
2100 |
72146 |
china.zhangchenzi |
E |
June 3, 2010, 2:48 p.m. |
OK |
GNU C |
TESTS |
20 |
280 |
5529600 |
|
2100 |
71999 |
poao899 |
E |
June 3, 2010, 2:41 p.m. |
OK |
GNU C++ |
TESTS |
20 |
310 |
3686400 |
|
2100 |
71317 |
mikhailt |
E |
June 3, 2010, 2:11 p.m. |
OK |
GNU C++ |
TESTS |
20 |
420 |
4505600 |
|
2100 |
70472 |
krijgertje |
E |
June 3, 2010, 1:36 p.m. |
OK |
GNU C++ |
TESTS |
20 |
470 |
3481600 |
|
2100 |
71555 |
DPR-pavlin |
E |
June 3, 2010, 2:21 p.m. |
OK |
GNU C++ |
TESTS |
20 |
480 |
3481600 |
|
2100 |
71256 |
pradhanp |
E |
June 3, 2010, 2:08 p.m. |
OK |
GNU C++ |
TESTS |
20 |
530 |
15564800 |
|
2100 |
71765 |
tranhaidangfpt |
E |
June 3, 2010, 2:30 p.m. |
OK |
GNU C++ |
TESTS |
20 |
550 |
35020800 |
|
2100 |
70518 |
ycc_DIV2 |
E |
June 3, 2010, 1:38 p.m. |
OK |
GNU C++ |
TESTS |
20 |
560 |
4608000 |
|
2100 |
72224 |
zjut020V2.0 |
E |
June 3, 2010, 2:51 p.m. |
OK |
GNU C++ |
TESTS |
20 |
770 |
3481600 |
|
2100 |
71009 |
ftfish |
E |
June 3, 2010, 1:57 p.m. |
OK |
GNU C++ |
TESTS |
20 |
780 |
3481600 |
|
2100 |
71545 |
volkhin |
E |
June 3, 2010, 2:20 p.m. |
OK |
GNU C++ |
TESTS |
20 |
780 |
9728000 |
|
2100 |
71234 |
agus.mw |
E |
June 3, 2010, 2:07 p.m. |
OK |
Java 6 |
TESTS |
20 |
300 |
42188800 |
|
2100 |
71591 |
tomerun |
E |
June 3, 2010, 2:22 p.m. |
OK |
Java 6 |
TESTS |
20 |
410 |
42188800 |
|
2100 |
72434 |
TryCSharp |
E |
June 3, 2010, 2:59 p.m. |
OK |
Mono C# |
TESTS |
20 |
1280 |
70348800 |
|
2100 |
70287 |
alexander.yuriev |
E |
June 3, 2010, 1:29 p.m. |
OK |
MS C++ |
TESTS |
20 |
190 |
3481600 |
|
2100 |
71526 |
Arkadiy |
E |
June 3, 2010, 2:20 p.m. |
OK |
MS C++ |
TESTS |
20 |
520 |
11878400 |
|
2100 |
remove filters
Back to search problems