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"Shrek and the Donkey (as you can guess, they also live in the far away kingdom) decided to play a card game called YAGame. The rules are very simple: initially Shrek holds m cards and the Donkey holds n cards (the players do not see each other's cards), and one more card lies on the table face down so that both players cannot see it as well. Thus, at the beginning of the game there are overall m xe2 x80 x89+ xe2 x80 x89n xe2 x80 x89+ xe2 x80 x891 cards. Besides, the players know which cards the pack of cards consists of and their own cards (but they do not know which card lies on the table and which ones the other player has). The players move in turn and Shrek starts. During a move a player can: Help Shrek assuming the pills are good in quality and that both players using them start playing in the optimal manner. The first line contains space-separated integers m and n (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m, xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000). Print space-separated probabilities that Shrek wins and Donkey wins correspondingly; the absolute error should not exceed 10 xe2 x80 x89- xe2 x80 x899."... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
3225591 |
konstantanter |
E |
March 1, 2013, 2:31 p.m. |
OK |
FPC |
TESTS |
100 |
93 |
14643200 |
|
2500 |
1749255 |
zdf615328619 |
E |
June 1, 2012, 9:42 a.m. |
OK |
FPC |
TESTS |
100 |
110 |
10444800 |
|
2500 |
68028793 |
1942938446 |
E |
Jan. 1, 2020, 7:51 a.m. |
OK |
FPC |
TESTS |
100 |
124 |
8192000 |
|
2500 |
35899366 |
______u______ |
E |
March 3, 2018, 6:33 p.m. |
OK |
FPC |
TESTS |
100 |
124 |
16281600 |
|
2500 |
35899311 |
_____k_____ |
E |
March 3, 2018, 6:31 p.m. |
OK |
FPC |
TESTS |
100 |
124 |
16281600 |
|
2500 |
35898690 |
_____i_____ |
E |
March 3, 2018, 6:22 p.m. |
OK |
FPC |
TESTS |
100 |
124 |
16281600 |
|
2500 |
35898651 |
______n______ |
E |
March 3, 2018, 6:21 p.m. |
OK |
FPC |
TESTS |
100 |
124 |
16281600 |
|
2500 |
1742862 |
blackapple |
E |
May 30, 2012, 12:22 p.m. |
OK |
FPC |
TESTS |
100 |
130 |
15769600 |
|
2500 |
1742848 |
blackapple |
E |
May 30, 2012, 12:18 p.m. |
OK |
FPC |
TESTS |
100 |
130 |
15769600 |
|
2500 |
1385925 |
sillycross |
E |
March 22, 2012, 1:46 a.m. |
OK |
FPC |
TESTS |
100 |
140 |
12492800 |
|
2500 |
15142312 |
HappyNewYearMike |
E |
Dec. 31, 2015, 10:15 p.m. |
OK |
GNU C++ |
TESTS |
100 |
62 |
9011200 |
|
2500 |
18837235 |
dogther |
E |
July 1, 2016, 8:47 a.m. |
OK |
GNU C++ |
TESTS |
100 |
62 |
9113600 |
|
2500 |
29708839 |
progg_admin |
E |
Aug. 23, 2017, 1:43 p.m. |
OK |
GNU C++ |
TESTS |
100 |
62 |
9216000 |
|
2500 |
5340646 |
duzfan |
E |
Dec. 3, 2013, 7:03 a.m. |
OK |
GNU C++ |
TESTS |
100 |
62 |
9216000 |
|
2500 |
25102235 |
vjudge2 |
E |
Feb. 28, 2017, 1:47 p.m. |
OK |
GNU C++ |
TESTS |
100 |
62 |
10035200 |
|
2500 |
34533359 |
jefflyy |
E |
Jan. 25, 2018, 2:01 a.m. |
OK |
GNU C++ |
TESTS |
100 |
62 |
10137600 |
|
2500 |
25310235 |
Hillan |
E |
March 7, 2017, 8:29 a.m. |
OK |
GNU C++ |
TESTS |
100 |
62 |
10240000 |
|
2500 |
20152556 |
vjudge3 |
E |
Aug. 25, 2016, 11:38 a.m. |
OK |
GNU C++ |
TESTS |
100 |
62 |
10342400 |
|
2500 |
2953993 |
perennial_fanatic |
E |
Jan. 17, 2013, 5:54 p.m. |
OK |
GNU C++ |
TESTS |
100 |
78 |
9420800 |
|
2500 |
1998133 |
vjudge5 |
E |
Aug. 10, 2012, 4:19 p.m. |
OK |
GNU C++ |
TESTS |
100 |
80 |
9728000 |
|
2500 |
7040241 |
FancyCoder |
E |
July 7, 2014, 11:14 a.m. |
OK |
GNU C++0x |
TESTS |
100 |
92 |
12492800 |
|
2500 |
1070634 |
ztk |
E |
Jan. 16, 2012, 9:56 p.m. |
OK |
GNU C++0x |
TESTS |
100 |
110 |
13619200 |
|
2500 |
58687166 |
zhouhongkai |
E |
Aug. 13, 2019, 12:42 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
62 |
7987200 |
|
2500 |
51671394 |
Dfkdsmbd |
E |
March 22, 2019, 8:25 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
62 |
8396800 |
|
2500 |
69165703 |
iotang |
E |
Jan. 20, 2020, 3:34 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
62 |
9318400 |
|
2500 |
20187591 |
I_always_love_cc |
E |
Aug. 27, 2016, 4:40 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
62 |
10444800 |
|
2500 |
33880409 |
Claris |
E |
Jan. 3, 2018, 8:11 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
62 |
11161600 |
|
2500 |
23547570 |
diogo |
E |
Jan. 5, 2017, 4:28 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
62 |
13619200 |
|
2500 |
32775478 |
wfj_2048 |
E |
Nov. 29, 2017, 8:39 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
62 |
14438400 |
|
2500 |
50092541 |
Siyuan |
E |
Feb. 18, 2019, 11:12 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
92 |
7884800 |
|
2500 |
58687067 |
zhouhongkai |
E |
Aug. 13, 2019, 12:36 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
92 |
7987200 |
|
2500 |
39103716 |
rushcheyo |
E |
June 10, 2018, 10:58 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
92 |
7987200 |
|
2500 |
29644872 |
whzzt |
E |
Aug. 21, 2017, 1:44 p.m. |
OK |
GNU C++14 |
TESTS |
100 |
62 |
9216000 |
|
2500 |
29702987 |
whjhr |
E |
Aug. 23, 2017, 9:32 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
62 |
9318400 |
|
2500 |
29282704 |
Marco_L_T |
E |
Aug. 8, 2017, 9:57 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
62 |
11161600 |
|
2500 |
53688532 |
BestMSN |
E |
May 3, 2019, 2:58 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
92 |
8192000 |
|
2500 |
51763816 |
jslijin |
E |
March 23, 2019, 2:54 p.m. |
OK |
GNU C++14 |
TESTS |
100 |
92 |
8192000 |
|
2500 |
50086536 |
applese |
E |
Feb. 18, 2019, 7:47 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
92 |
8192000 |
|
2500 |
57350697 |
ccsu_cat_love_jiejie |
E |
July 20, 2019, 3:17 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
92 |
8294400 |
|
2500 |
44476543 |
Yoyoball |
E |
Oct. 18, 2018, 9:17 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
92 |
8294400 |
|
2500 |
67271537 |
ElangBondol |
E |
Dec. 20, 2019, 8:31 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
92 |
8499200 |
|
2500 |
63206685 |
sy_chen |
E |
Oct. 23, 2019, 12:31 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
92 |
8704000 |
|
2500 |
54270656 |
flc_kurisu |
E |
May 17, 2019, 8:37 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
92 |
8192000 |
|
2500 |
54270617 |
flc_kurisu |
E |
May 17, 2019, 8:36 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
92 |
8192000 |
|
2500 |
54267723 |
flc_kurisu |
E |
May 17, 2019, 7 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
92 |
8192000 |
|
2500 |
40305601 |
ruo |
E |
July 14, 2018, 5:33 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
92 |
8192000 |
|
2500 |
53005412 |
flc_kurisu |
E |
April 19, 2019, 9:19 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
92 |
9216000 |
|
2500 |
53004714 |
flc_kurisu |
E |
April 19, 2019, 8:59 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
92 |
9216000 |
|
2500 |
40182101 |
lukagvritishvili |
E |
July 10, 2018, 8:06 p.m. |
OK |
GNU C++17 |
TESTS |
100 |
92 |
9932800 |
|
2500 |
37585922 |
Ignatz |
E |
April 25, 2018, 1:11 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
92 |
11673600 |
|
2500 |
67693882 |
user060804 |
E |
Dec. 27, 2019, 12:18 p.m. |
OK |
GNU C++17 |
TESTS |
100 |
92 |
12288000 |
|
2500 |
50273732 |
nekko |
E |
Feb. 21, 2019, 8:48 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
124 |
16588800 |
|
2500 |
559907 |
Petr |
E |
July 22, 2011, 4:46 p.m. |
OK |
Java 6 |
TESTS |
100 |
250 |
43110400 |
|
2500 |
568643 |
Slevin |
E |
July 28, 2011, 5:50 p.m. |
OK |
MS C++ |
TESTS |
100 |
90 |
9830400 |
|
2500 |
600087 |
aan93 |
E |
Aug. 9, 2011, 9:04 a.m. |
OK |
MS C++ |
TESTS |
100 |
130 |
9523200 |
|
2500 |
remove filters
Back to search problems