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"The rules of Sith Tournament are well known to everyone. n Sith take part in the Tournament. The Tournament starts with the random choice of two Sith who will fight in the first battle. As one of them loses, his place is taken by the next randomly chosen Sith who didn't fight before. Does it need to be said that each battle in the Sith Tournament ends with a death of one of opponents? The Tournament ends when the only Sith remains alive. Jedi Ivan accidentally appeared in the list of the participants in the Sith Tournament. However, his skills in the Light Side of the Force are so strong so he can influence the choice of participants either who start the Tournament or who take the loser's place after each battle. Of course, he won't miss his chance to take advantage of it. Help him to calculate the probability of his victory. The first line contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8918) -- the number of participants of the Sith Tournament. Each of the next n lines contains n real numbers, which form a matrix pij (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pij xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891). Each its element pij is the probability that the i-th participant defeats the j-th in a duel. The elements on the main diagonal pii are equal to zero. For all different i, j the equality pij xe2 x80 x89+ xe2 x80 x89pji xe2 x80 x89= xe2 x80 x891 holds. All probabilities are given with no more than six decimal places. Jedi Ivan is the number 1 in the list of the participants. Output a real number -- the probability that Jedi Ivan will stay alive after the Tournament. Absolute or relative error of the answer must not exceed 10 xe2 x80 x89- xe2 x80 x896."... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
41030186 |
cpy |
E |
July 31, 2018, 2:49 p.m. |
OK |
D |
TESTS |
41 |
951 |
74752000 |
|
2200 |
53592614 |
kfhkx |
E |
May 1, 2019, 1:37 a.m. |
OK |
FPC |
TESTS |
41 |
420 |
149094400 |
|
2200 |
22690124 |
nickyrio |
E |
Dec. 4, 2016, 7:16 a.m. |
OK |
FPC |
TESTS |
41 |
468 |
37888000 |
|
2200 |
21222053 |
rainboy |
E |
Oct. 5, 2016, 9:14 p.m. |
OK |
GNU C |
TESTS |
41 |
124 |
38092800 |
|
2200 |
19738740 |
nagabhushan |
E |
Aug. 9, 2016, 2:07 a.m. |
OK |
GNU C |
TESTS |
41 |
187 |
85913600 |
|
2200 |
18426857 |
sgtlaugh |
E |
June 13, 2016, 5:15 p.m. |
OK |
GNU C |
TESTS |
41 |
1091 |
85094400 |
|
2200 |
18526229 |
FundamentalEq |
E |
June 16, 2016, 4:53 p.m. |
OK |
GNU C++ |
TESTS |
41 |
15 |
0 |
|
2200 |
32039084 |
wmd |
E |
Nov. 3, 2017, 11:46 p.m. |
OK |
GNU C++ |
TESTS |
41 |
31 |
0 |
|
2200 |
21461918 |
mjhun |
E |
Oct. 15, 2016, 4:08 p.m. |
OK |
GNU C++ |
TESTS |
41 |
78 |
4505600 |
|
2200 |
18451757 |
vThejas |
E |
June 14, 2016, 1:09 p.m. |
OK |
GNU C++ |
TESTS |
41 |
108 |
8089600 |
|
2200 |
19461984 |
vjudge1 |
E |
July 28, 2016, 1:12 p.m. |
OK |
GNU C++ |
TESTS |
41 |
109 |
37580800 |
|
2200 |
18453321 |
5_Apm |
E |
June 14, 2016, 2:26 p.m. |
OK |
GNU C++ |
TESTS |
41 |
109 |
37580800 |
|
2200 |
41638216 |
vjudge1 |
E |
Aug. 16, 2018, 2:43 a.m. |
OK |
GNU C++ |
TESTS |
41 |
109 |
37888000 |
|
2200 |
40539075 |
dhuacm6 |
E |
July 19, 2018, 7:40 a.m. |
OK |
GNU C++ |
TESTS |
41 |
109 |
37888000 |
|
2200 |
18645428 |
imathi |
E |
June 22, 2016, 11:18 a.m. |
OK |
GNU C++ |
TESTS |
41 |
109 |
39014400 |
|
2200 |
24640044 |
zhzxcool |
E |
Feb. 14, 2017, 1:16 a.m. |
OK |
GNU C++ |
TESTS |
41 |
109 |
39731200 |
|
2200 |
22930567 |
norshtein |
E |
Dec. 13, 2016, 4:09 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
15 |
0 |
|
2200 |
19472575 |
Bobocan |
E |
July 29, 2016, 5:11 a.m. |
OK |
GNU C++11 |
TESTS |
41 |
15 |
0 |
|
2200 |
19227465 |
slavik |
E |
July 19, 2016, 8:34 a.m. |
OK |
GNU C++11 |
TESTS |
41 |
15 |
0 |
|
2200 |
18843608 |
marX |
E |
July 1, 2016, 4:42 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
15 |
0 |
|
2200 |
18507083 |
vanvector |
E |
June 15, 2016, 9:25 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
15 |
0 |
|
2200 |
18489412 |
ffao |
E |
June 15, 2016, 6:35 a.m. |
OK |
GNU C++11 |
TESTS |
41 |
15 |
0 |
|
2200 |
26107569 |
Kusika |
E |
April 3, 2017, 7:28 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
15 |
2048000 |
|
2200 |
18535758 |
onsankawai |
E |
June 17, 2016, 4:41 a.m. |
OK |
GNU C++11 |
TESTS |
41 |
30 |
0 |
|
2200 |
40984390 |
ReaLNero1 |
E |
July 30, 2018, 7:20 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
30 |
102400 |
|
2200 |
64568521 |
luogu_bot3 |
E |
Nov. 9, 2019, 8:22 a.m. |
OK |
GNU C++11 |
TESTS |
41 |
31 |
0 |
|
2200 |
45882036 |
hemant_patwal |
E |
Nov. 17, 2018, 2:21 p.m. |
OK |
GNU C++14 |
TESTS |
41 |
77 |
8601600 |
|
2200 |
21114295 |
sincerity |
E |
Oct. 2, 2016, 12:18 p.m. |
OK |
GNU C++14 |
TESTS |
41 |
78 |
2252800 |
|
2200 |
61852782 |
Amireza |
E |
Oct. 4, 2019, 1:11 p.m. |
OK |
GNU C++14 |
TESTS |
41 |
78 |
8601600 |
|
2200 |
34000895 |
TearinFree |
E |
Jan. 8, 2018, 10:03 a.m. |
OK |
GNU C++14 |
TESTS |
41 |
93 |
3993600 |
|
2200 |
51098140 |
mrm_196 |
E |
March 9, 2019, 5:33 p.m. |
OK |
GNU C++14 |
TESTS |
41 |
93 |
4403200 |
|
2200 |
56631481 |
icecuber |
E |
July 6, 2019, 4:34 p.m. |
OK |
GNU C++14 |
TESTS |
41 |
93 |
18022400 |
|
2200 |
28672818 |
cerberus97 |
E |
July 18, 2017, 3:53 p.m. |
OK |
GNU C++14 |
TESTS |
41 |
93 |
81920000 |
|
2200 |
28948513 |
demerzel |
E |
July 28, 2017, 8:54 a.m. |
OK |
GNU C++14 |
TESTS |
41 |
108 |
39936000 |
|
2200 |
21555501 |
hdi |
E |
Oct. 18, 2016, 2:25 a.m. |
OK |
GNU C++14 |
TESTS |
41 |
109 |
39731200 |
|
2200 |
28947885 |
demerzel |
E |
July 28, 2017, 8:33 a.m. |
OK |
GNU C++14 |
TESTS |
41 |
109 |
39936000 |
|
2200 |
53688435 |
Pro_king |
E |
May 3, 2019, 2:54 a.m. |
OK |
GNU C++17 |
TESTS |
41 |
31 |
0 |
|
2200 |
53695283 |
Pro_king |
E |
May 3, 2019, 7:24 a.m. |
OK |
GNU C++17 |
TESTS |
41 |
31 |
0 |
|
2200 |
64563287 |
Duanyll |
E |
Nov. 9, 2019, 6:48 a.m. |
OK |
GNU C++17 |
TESTS |
41 |
31 |
204800 |
|
2200 |
51259978 |
ivan100sic |
E |
March 13, 2019, 12:56 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
31 |
204800 |
|
2200 |
47517449 |
Shayan.P |
E |
Dec. 26, 2018, 10:53 a.m. |
OK |
GNU C++17 |
TESTS |
41 |
78 |
2252800 |
|
2200 |
41220498 |
bktl1love |
E |
Aug. 4, 2018, 3:25 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
93 |
3276800 |
|
2200 |
63267181 |
Jefe |
E |
Oct. 24, 2019, 1:10 a.m. |
OK |
GNU C++17 |
TESTS |
41 |
93 |
37990400 |
|
2200 |
53005606 |
Vacantxin_love_null |
E |
April 19, 2019, 9:25 a.m. |
OK |
GNU C++17 |
TESTS |
41 |
108 |
37785600 |
|
2200 |
59274233 |
INVWVZ |
E |
Aug. 22, 2019, 1:58 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
124 |
28774400 |
|
2200 |
58529361 |
mohmahkho |
E |
Aug. 10, 2019, 8:45 a.m. |
OK |
GNU C++17 |
TESTS |
41 |
155 |
2252800 |
|
2200 |
18440534 |
ya_rb |
E |
June 14, 2016, 1:24 a.m. |
OK |
Java 7 |
TESTS |
41 |
842 |
44236800 |
|
2200 |
18440213 |
sqrtdecompton |
E |
June 14, 2016, 12:56 a.m. |
OK |
Java 7 |
TESTS |
41 |
904 |
38912000 |
|
2200 |
18783338 |
ahmad_mamdouh |
E |
June 29, 2016, 12:47 p.m. |
OK |
Java 7 |
TESTS |
41 |
1574 |
82124800 |
|
2200 |
18433796 |
ahmad_mamdouh |
E |
June 13, 2016, 6:26 p.m. |
OK |
Java 7 |
TESTS |
41 |
1715 |
82124800 |
|
2200 |
21323502 |
HenryGau |
E |
Oct. 9, 2016, 5:17 p.m. |
OK |
Java 8 |
TESTS |
41 |
186 |
21606400 |
|
2200 |
20470360 |
kafy83 |
E |
Sept. 9, 2016, 12:54 a.m. |
OK |
Java 8 |
TESTS |
41 |
342 |
0 |
|
2200 |
21218945 |
Dukkha |
E |
Oct. 5, 2016, 6:13 p.m. |
OK |
Java 8 |
TESTS |
41 |
358 |
41779200 |
|
2200 |
20205715 |
aminul |
E |
Aug. 28, 2016, 5:36 a.m. |
OK |
Java 8 |
TESTS |
41 |
374 |
20787200 |
|
2200 |
21699396 |
abear888 |
E |
Oct. 23, 2016, 6:32 a.m. |
OK |
Java 8 |
TESTS |
41 |
467 |
41779200 |
|
2200 |
18445700 |
kenkoooo |
E |
June 14, 2016, 7:39 a.m. |
OK |
Java 8 |
TESTS |
41 |
545 |
41779200 |
|
2200 |
19567772 |
shalamanov.marin |
E |
Aug. 1, 2016, 8:10 p.m. |
OK |
Java 8 |
TESTS |
41 |
545 |
42803200 |
|
2200 |
60321638 |
jenish9599 |
E |
Sept. 9, 2019, 8:53 p.m. |
OK |
Java 8 |
TESTS |
41 |
592 |
41164800 |
|
2200 |
18448933 |
kenkoooo |
E |
June 14, 2016, 10:41 a.m. |
OK |
Java 8 |
TESTS |
41 |
592 |
41779200 |
|
2200 |
43586295 |
Slamur |
E |
Sept. 29, 2018, 8:19 p.m. |
OK |
Java 8 |
TESTS |
41 |
623 |
62668800 |
|
2200 |
19948286 |
renadeen |
E |
Aug. 18, 2016, 2:53 p.m. |
OK |
MS C# |
TESTS |
41 |
234 |
29798400 |
|
2200 |
18427411 |
azukun |
E |
June 13, 2016, 5:19 p.m. |
OK |
MS C# |
TESTS |
41 |
295 |
19865600 |
|
2200 |
18610991 |
AnatolyTolstobrov |
E |
June 20, 2016, 8:38 a.m. |
OK |
MS C# |
TESTS |
41 |
780 |
38707200 |
|
2200 |
18779952 |
Los_Angelos_Laycurse |
E |
June 29, 2016, 8:41 a.m. |
OK |
MS C++ |
TESTS |
41 |
124 |
37785600 |
|
2200 |
19459925 |
vjudge1 |
E |
July 28, 2016, 11:06 a.m. |
OK |
MS C++ |
TESTS |
41 |
124 |
37888000 |
|
2200 |
19458168 |
vjudge4 |
E |
July 28, 2016, 9:08 a.m. |
OK |
MS C++ |
TESTS |
41 |
139 |
37888000 |
|
2200 |
20088706 |
mshcherba |
E |
Aug. 23, 2016, 3:15 p.m. |
OK |
MS C++ |
TESTS |
41 |
171 |
20992000 |
|
2200 |
64563560 |
vjudge4 |
E |
Nov. 9, 2019, 6:54 a.m. |
OK |
MS C++ |
TESTS |
41 |
202 |
39936000 |
|
2200 |
18490257 |
Denisson |
E |
June 15, 2016, 7:18 a.m. |
OK |
MS C++ |
TESTS |
41 |
217 |
79872000 |
|
2200 |
19457785 |
vjudge5 |
E |
July 28, 2016, 8:50 a.m. |
OK |
MS C++ |
TESTS |
41 |
280 |
168140800 |
|
2200 |
19456258 |
vjudge4 |
E |
July 28, 2016, 7:20 a.m. |
OK |
MS C++ |
TESTS |
41 |
296 |
168140800 |
|
2200 |
18443426 |
noxwell |
E |
June 14, 2016, 5:11 a.m. |
OK |
MS C++ |
TESTS |
41 |
467 |
72192000 |
|
2200 |
18754405 |
Mogby |
E |
June 27, 2016, 3:07 p.m. |
OK |
MS C++ |
TESTS |
41 |
468 |
189132800 |
|
2200 |
59832027 |
siwei |
E |
Sept. 1, 2019, 12:15 a.m. |
OK |
MS C++ 2017 |
TESTS |
41 |
779 |
43212800 |
|
2200 |
18437446 |
alexey.shchepin |
E |
June 13, 2016, 9:02 p.m. |
OK |
Ocaml |
TESTS |
41 |
858 |
62873600 |
|
2200 |
18488481 |
jacobt |
E |
June 15, 2016, 5:33 a.m. |
OK |
Python 2 |
TESTS |
41 |
46 |
0 |
|
2200 |
remove filters
Back to search problems