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 |
891
|
Codeforces Round 446 (Div. 1) |
FINISHED |
False |
7200 |
226596323 |
Nov. 17, 2017, 2:35 p.m. |
Problems
B"A false witness that speaketh lies! You are given a sequence containing n integers. There is a variable res that is equal to 0 initially. The following process repeats k times. Choose an index from 1 to n uniformly at random. Name it x. Add to res the multiply of all ai's such that 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, but i xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89x. Then, subtract ax by 1. You have to find expected value of res at the end of the process. It can be proved that the expected value of res can be represented as an irreducible fraction . You have to find . The first line contains two integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the number of elements and parameter k that is specified in the statement. The second line contains n space separated integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). Output a single integer -- the value . "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
32397469 |
JOHNKRAM |
E |
Nov. 17, 2017, 3:41 p.m. |
OK |
GNU C++ |
TESTS |
91 |
124 |
0 |
|
2800 |
32530467 |
MemS |
E |
Nov. 21, 2017, 4:07 p.m. |
OK |
GNU C++ |
TESTS |
91 |
124 |
102400 |
|
2800 |
34632694 |
SanSiroWaltz |
E |
Jan. 28, 2018, 12:29 p.m. |
OK |
GNU C++ |
TESTS |
91 |
124 |
1843200 |
|
2800 |
33442271 |
ytc020306 |
E |
Dec. 20, 2017, 12:41 a.m. |
OK |
GNU C++ |
TESTS |
91 |
124 |
1945600 |
|
2800 |
33282779 |
F.Darcy |
E |
Dec. 16, 2017, 7:17 a.m. |
OK |
GNU C++ |
TESTS |
91 |
124 |
1945600 |
|
2800 |
34663655 |
litble |
E |
Jan. 29, 2018, 1:56 p.m. |
OK |
GNU C++ |
TESTS |
91 |
124 |
2150400 |
|
2800 |
34412096 |
litble |
E |
Jan. 21, 2018, 11:40 a.m. |
OK |
GNU C++ |
TESTS |
91 |
124 |
2150400 |
|
2800 |
33255345 |
suchang |
E |
Dec. 15, 2017, 5:30 a.m. |
OK |
GNU C++ |
TESTS |
91 |
124 |
2150400 |
|
2800 |
34412142 |
vjudge4 |
E |
Jan. 21, 2018, 11:42 a.m. |
OK |
GNU C++ |
TESTS |
91 |
139 |
2150400 |
|
2800 |
33155037 |
VPigeonKing |
E |
Dec. 12, 2017, 12:43 p.m. |
OK |
GNU C++ |
TESTS |
91 |
139 |
2150400 |
|
2800 |
67149848 |
PresHerobrine |
E |
Dec. 18, 2019, 10:19 a.m. |
OK |
GNU C++11 |
TESTS |
91 |
46 |
1331200 |
|
2800 |
67149749 |
PresHerobrine |
E |
Dec. 18, 2019, 10:17 a.m. |
OK |
GNU C++11 |
TESTS |
91 |
46 |
1331200 |
|
2800 |
68771616 |
zsyzsy |
E |
Jan. 14, 2020, 12:04 p.m. |
OK |
GNU C++11 |
TESTS |
91 |
93 |
0 |
|
2800 |
66666336 |
sshwyR |
E |
Dec. 12, 2019, 7:19 a.m. |
OK |
GNU C++11 |
TESTS |
91 |
108 |
0 |
|
2800 |
47422353 |
Rand_By_Rand |
E |
Dec. 23, 2018, 2:55 p.m. |
OK |
GNU C++11 |
TESTS |
91 |
108 |
0 |
|
2800 |
54260400 |
_twilight |
E |
May 17, 2019, 12:50 a.m. |
OK |
GNU C++11 |
TESTS |
91 |
108 |
102400 |
|
2800 |
63555348 |
Glu_TtoNy |
E |
Oct. 27, 2019, 12:43 p.m. |
OK |
GNU C++11 |
TESTS |
91 |
109 |
0 |
|
2800 |
63555137 |
vjudge4 |
E |
Oct. 27, 2019, 12:41 p.m. |
OK |
GNU C++11 |
TESTS |
91 |
109 |
0 |
|
2800 |
57768603 |
py_ultron |
E |
July 25, 2019, 10:29 p.m. |
OK |
GNU C++11 |
TESTS |
91 |
109 |
0 |
|
2800 |
47396108 |
daifucong |
E |
Dec. 23, 2018, 11:17 a.m. |
OK |
GNU C++11 |
TESTS |
91 |
109 |
0 |
|
2800 |
45913363 |
vjudge3 |
E |
Nov. 18, 2018, 12:48 p.m. |
OK |
GNU C++14 |
TESTS |
91 |
93 |
0 |
|
2800 |
45754901 |
vjudge3 |
E |
Nov. 15, 2018, 5:02 a.m. |
OK |
GNU C++14 |
TESTS |
91 |
93 |
102400 |
|
2800 |
50143690 |
CN_zwang2002 |
E |
Feb. 19, 2019, 1:26 a.m. |
OK |
GNU C++14 |
TESTS |
91 |
93 |
6451200 |
|
2800 |
50567383 |
zhou888 |
E |
Feb. 27, 2019, 1:44 p.m. |
OK |
GNU C++14 |
TESTS |
91 |
109 |
0 |
|
2800 |
32422646 |
apiadu |
E |
Nov. 18, 2017, 6:47 a.m. |
OK |
GNU C++14 |
TESTS |
91 |
109 |
0 |
|
2800 |
40979136 |
ReaLNero1 |
E |
July 30, 2018, 4:57 p.m. |
OK |
GNU C++14 |
TESTS |
91 |
124 |
0 |
|
2800 |
32505965 |
Twishkle.Aevdark |
E |
Nov. 20, 2017, 4:31 p.m. |
OK |
GNU C++14 |
TESTS |
91 |
124 |
0 |
|
2800 |
32424355 |
ftiasch |
E |
Nov. 18, 2017, 8:14 a.m. |
OK |
GNU C++14 |
TESTS |
91 |
124 |
0 |
|
2800 |
32409495 |
dreamoon_love_AA |
E |
Nov. 17, 2017, 6:52 p.m. |
OK |
GNU C++14 |
TESTS |
91 |
124 |
0 |
|
2800 |
32569964 |
NiroBC |
E |
Nov. 23, 2017, 8:41 a.m. |
OK |
GNU C++14 |
TESTS |
91 |
124 |
102400 |
|
2800 |
50416214 |
Dance_Of_Faith |
E |
Feb. 24, 2019, 6:41 a.m. |
OK |
GNU C++17 |
TESTS |
91 |
93 |
307200 |
|
2800 |
47827193 |
Benq |
E |
Jan. 2, 2019, 1:36 a.m. |
OK |
GNU C++17 |
TESTS |
91 |
109 |
0 |
|
2800 |
62585036 |
wm101 rishabh.ranjan whyamievenhere |
E |
Oct. 14, 2019, 6:30 p.m. |
OK |
GNU C++17 |
TESTS |
91 |
124 |
102400 |
|
2800 |
47536267 |
alpc_qleonardo |
E |
Dec. 27, 2018, 2:03 a.m. |
OK |
GNU C++17 |
TESTS |
91 |
124 |
204800 |
|
2800 |
48277432 |
zhangqingqi |
E |
Jan. 12, 2019, 6:27 a.m. |
OK |
GNU C++17 |
TESTS |
91 |
139 |
202342400 |
|
2800 |
47458876 |
Rzepa |
E |
Dec. 24, 2018, 2:02 p.m. |
OK |
GNU C++17 |
TESTS |
91 |
140 |
201113600 |
|
2800 |
67266160 |
vjudge4 |
E |
Dec. 20, 2019, 6:16 a.m. |
OK |
GNU C++17 |
TESTS |
91 |
171 |
307200 |
|
2800 |
66745307 |
Zhou_JK |
E |
Dec. 13, 2019, 1:31 a.m. |
OK |
GNU C++17 |
TESTS |
91 |
171 |
307200 |
|
2800 |
45791561 |
ImpcO |
E |
Nov. 16, 2018, 7:27 a.m. |
OK |
GNU C++17 |
TESTS |
91 |
186 |
102400 |
|
2800 |
51263605 |
tkj |
E |
March 13, 2019, 2:27 p.m. |
OK |
GNU C++17 |
TESTS |
91 |
187 |
102400 |
|
2800 |
34117832 |
tri |
E |
Jan. 13, 2018, 3:21 a.m. |
OK |
Java 8 |
TESTS |
91 |
483 |
20684800 |
|
2800 |
32413240 |
mmaxio |
E |
Nov. 17, 2017, 8:18 p.m. |
OK |
Java 8 |
TESTS |
91 |
561 |
0 |
|
2800 |
32412380 |
uwi |
E |
Nov. 17, 2017, 7:54 p.m. |
OK |
Java 8 |
TESTS |
91 |
1372 |
0 |
|
2800 |
32409604 |
uwi |
E |
Nov. 17, 2017, 6:54 p.m. |
OK |
Java 8 |
TESTS |
91 |
1996 |
0 |
|
2800 |
56691536 |
vjudge2 |
E |
July 8, 2019, 4:16 a.m. |
OK |
MS C++ |
TESTS |
91 |
202 |
102400 |
|
2800 |
56691527 |
vjudge2 |
E |
July 8, 2019, 4:16 a.m. |
OK |
MS C++ |
TESTS |
91 |
202 |
102400 |
|
2800 |
33917776 |
xlk |
E |
Jan. 5, 2018, 8:15 a.m. |
OK |
PyPy 2 |
TESTS |
91 |
1591 |
30105600 |
|
2800 |
remove filters
Back to search problems