Codeforces Round 689 (Div. 2, based on Zed Code Competition)

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
1461 Codeforces Round 689 (Div. 2, based on Zed Code Competition) FINISHED False 7200 129569062 Dec. 11, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11426 ) C Random Events PROGRAMMING math probabilities

B"Ron is a happy owner of a permutation a of length n . A permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation ( 2 appears twice in the array) and [1,3,4] is also not a permutation ( n=3 but there is 4 in the array). Ron's permutation is subjected to m experiments of the following type: ( r_i , p_i ). This means that elements in range [1, r_i] (in other words, the prefix of length r_i ) have to be sorted in ascending order with the probability of p_i . All experiments are performed in the same order in which they are specified in the input data. As an example, let's take a look at a permutation [4, 2, 1, 5, 3] and an experiment ( 3, 0.6 ). After such an experiment with the probability of 60 % the permutation will assume the form [1, 2, 4, 5, 3] and with a 40 % probability it will remain unchanged. You have to determine the probability of the permutation becoming completely sorted in ascending order after m experiments. Each test contains one or more test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). The first line of each test case contains two integers n and m (1 <= n, m <= 10^5) -- the length of the permutation and the number of experiments, respectively. The second line of each test case contains n integers a_1, a_2, ldots, a_n (1 <= a_i <= n) -- contents of the permutation. The following m lines of each test case each contain an integer r_i and a real number p_i (1 <= r_i <= n, 0 <= p_i <= 1) -- the length of the prefix and the probability of it being sorted. All probabilities are given with at most 6 decimal places. It is guaranteed that the sum of n and the sum of m$$"...

Tutorials

Codeforces Round #689 (Div. 2). Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
100952791 daut-dlang C Dec. 11, 2020, 4:20 p.m. OK D TESTS 28 109 6144000
100951410 1435730 C Dec. 11, 2020, 4:16 p.m. OK GNU C11 TESTS 28 93 2150400
100982998 4790iop C Dec. 12, 2020, 3:10 a.m. OK GNU C++11 TESTS 28 31 1740800
100951043 zjh2017 C Dec. 11, 2020, 4:15 p.m. OK GNU C++11 TESTS 28 62 409600
100951714 wddmahe C Dec. 11, 2020, 4:17 p.m. OK GNU C++11 TESTS 28 62 2048000
100986389 ZCKNB C Dec. 12, 2020, 4:50 a.m. OK GNU C++11 TESTS 28 78 0
100987773 2uoidub C Dec. 12, 2020, 5:24 a.m. OK GNU C++11 TESTS 28 78 0
100981608 He_Ren C Dec. 12, 2020, 2:22 a.m. OK GNU C++11 TESTS 28 78 204800
100984446 hnust_tanghaozhe C Dec. 12, 2020, 3:56 a.m. OK GNU C++11 TESTS 28 78 409600
100982138 TYpeWriting C Dec. 12, 2020, 2:44 a.m. OK GNU C++11 TESTS 28 78 409600
100981882 Lxzy_Zby C Dec. 12, 2020, 2:33 a.m. OK GNU C++11 TESTS 28 78 409600
100986147 001122 C Dec. 12, 2020, 4:43 a.m. OK GNU C++11 TESTS 28 78 409600
100980926 BHwujiashuai1234 C Dec. 12, 2020, 1:50 a.m. OK GNU C++14 TESTS 28 108 8089600
100979351 repeat_ C Dec. 12, 2020, 12:33 a.m. OK GNU C++14 TESTS 28 140 819200
100986552 AsilenceBTF C Dec. 12, 2020, 4:55 a.m. OK GNU C++14 TESTS 28 140 4812800
100959765 byungkyu C Dec. 11, 2020, 5:06 p.m. OK GNU C++14 TESTS 28 155 409600
100987648 adhklp C Dec. 12, 2020, 5:21 a.m. OK GNU C++14 TESTS 28 155 409600
100989031 huzhiyu C Dec. 12, 2020, 5:47 a.m. OK GNU C++14 TESTS 28 155 819200
100984390 houguanli C Dec. 12, 2020, 3:55 a.m. OK GNU C++14 TESTS 28 155 2048000
100985395 Q_W_Q C Dec. 12, 2020, 4:24 a.m. OK GNU C++14 TESTS 28 155 2048000
100959026 ClickME C Dec. 11, 2020, 5:02 p.m. OK GNU C++14 TESTS 28 155 3993600
100986988 zstuycz C Dec. 12, 2020, 5:06 a.m. OK GNU C++14 TESTS 28 155 3993600
100983431 chen_zexing C Dec. 12, 2020, 3:23 a.m. OK GNU C++17 TESTS 28 93 409600
100957736 majiamajia66 C Dec. 11, 2020, 4:34 p.m. OK GNU C++17 TESTS 28 93 409600
100950913 newhar C Dec. 11, 2020, 4:14 p.m. OK GNU C++17 TESTS 28 108 819200
100973843 dionysios C Dec. 11, 2020, 8:28 p.m. OK GNU C++17 TESTS 28 140 409600
100982472 X-knight C Dec. 12, 2020, 2:55 a.m. OK GNU C++17 TESTS 28 155 409600
100985192 tukuai C Dec. 12, 2020, 4:18 a.m. OK GNU C++17 TESTS 28 155 409600
100966828 Zobayer_Abedin C Dec. 11, 2020, 6:22 p.m. OK GNU C++17 TESTS 28 155 409600
100960373 little_ge C Dec. 11, 2020, 5:11 p.m. OK GNU C++17 TESTS 28 155 409600
100953578 kimino C Dec. 11, 2020, 4:23 p.m. OK GNU C++17 TESTS 28 155 1638400
100989472 justtry____ C Dec. 12, 2020, 5:54 a.m. OK GNU C++17 TESTS 28 155 2048000
100980519 N1ukash C Dec. 12, 2020, 1:34 a.m. OK GNU C++17 (64) TESTS 28 78 2048000
100961169 Lovestarry C Dec. 11, 2020, 5:17 p.m. OK GNU C++17 (64) TESTS 28 202 8601600
100977721 essi C Dec. 11, 2020, 10:49 p.m. OK GNU C++17 (64) TESTS 28 234 0
100983701 PaliLo C Dec. 12, 2020, 3:33 a.m. OK GNU C++17 (64) TESTS 28 234 409600
100988940 ShadeSlide C Dec. 12, 2020, 5:45 a.m. OK GNU C++17 (64) TESTS 28 234 7782400
100988582 ShadeSlide C Dec. 12, 2020, 5:39 a.m. OK GNU C++17 (64) TESTS 28 249 7782400
100979807 KirbyOvO C Dec. 12, 2020, 12:56 a.m. OK GNU C++17 (64) TESTS 28 296 4096000
100959007 6553368 C Dec. 11, 2020, 5:02 p.m. OK GNU C++17 (64) TESTS 28 374 819200
100985854 ayush_nishad C Dec. 12, 2020, 4:36 a.m. OK GNU C++17 (64) TESTS 28 374 5120000
100968102 jenkinsser C Dec. 11, 2020, 6:40 p.m. OK GNU C++17 (64) TESTS 28 389 409600
100972933 williemaster C Dec. 11, 2020, 8:07 p.m. OK Go TESTS 28 218 4505600
100959034 remain_calm C Dec. 11, 2020, 5:02 p.m. OK Java 11 TESTS 28 202 0
100987606 liubenjamin C Dec. 12, 2020, 5:20 a.m. OK Java 11 TESTS 28 233 0
100972326 ay_08 C Dec. 11, 2020, 7:55 p.m. OK Java 11 TESTS 28 233 0
100970393 RuthlessAggression C Dec. 11, 2020, 7:18 p.m. OK Java 11 TESTS 28 249 0
100976276 decoder_1671 C Dec. 11, 2020, 9:39 p.m. OK Java 11 TESTS 28 249 27648000
100984668 rohanxyzgg C Dec. 12, 2020, 4:03 a.m. OK Java 11 TESTS 28 264 5939200
100976108 sam_abbas80 C Dec. 11, 2020, 9:33 p.m. OK Java 11 TESTS 28 265 102400
100948581 bever209 C Dec. 11, 2020, 4:06 p.m. OK Java 11 TESTS 28 327 8396800
100985067 AS23 C Dec. 12, 2020, 4:14 a.m. OK Java 11 TESTS 28 717 614400
100974621 kishanksah04 C Dec. 11, 2020, 8:45 p.m. OK Java 11 TESTS 28 717 614400
100978487 R3KT C Dec. 11, 2020, 11:35 p.m. OK Java 8 TESTS 28 109 0
100963433 tanmayks1999.ts C Dec. 11, 2020, 5:39 p.m. OK Java 8 TESTS 28 109 0
100982192 prasoon006 C Dec. 12, 2020, 2:46 a.m. OK Java 8 TESTS 28 139 0
100953863 3434194755HaiTQ C Dec. 11, 2020, 4:24 p.m. OK Java 8 TESTS 28 139 0
100977438 Snob C Dec. 11, 2020, 10:34 p.m. OK Java 8 TESTS 28 140 0
100963684 Adi_786 C Dec. 11, 2020, 5:42 p.m. OK Java 8 TESTS 28 140 0
100965670 moli2398 C Dec. 11, 2020, 6:06 p.m. OK Java 8 TESTS 28 155 0
100964907 conquerorArpit C Dec. 11, 2020, 5:56 p.m. OK Java 8 TESTS 28 155 0
100959826 MagentaCobra C Dec. 11, 2020, 5:07 p.m. OK Java 8 TESTS 28 170 0
100959619 poojakandoi06 C Dec. 11, 2020, 5:05 p.m. OK Java 8 TESTS 28 170 0
100967882 Eva C Dec. 11, 2020, 6:37 p.m. OK Kotlin TESTS 28 218 819200
100946856 11001101 C Dec. 11, 2020, 4 p.m. OK Kotlin TESTS 28 233 4505600
100953446 Ayyyoub C Dec. 11, 2020, 4:23 p.m. OK Kotlin TESTS 28 358 18432000
100967711 MrDracuLa C Dec. 11, 2020, 6:34 p.m. OK Mono C# TESTS 28 155 13619200
100948952 verschlafen C Dec. 11, 2020, 4:07 p.m. OK MS C++ TESTS 28 233 409600
100976060 P___ C Dec. 11, 2020, 9:31 p.m. OK MS C++ 2017 TESTS 28 109 409600
100979548 vjudge1 C Dec. 12, 2020, 12:42 a.m. OK MS C++ 2017 TESTS 28 124 1638400
100979123 201903007540 C Dec. 12, 2020, 12:19 a.m. OK MS C++ 2017 TESTS 28 124 1638400
100976371 Bullbas C Dec. 11, 2020, 9:43 p.m. OK MS C++ 2017 TESTS 28 171 819200
100961343 Gravekper C Dec. 11, 2020, 5:19 p.m. OK MS C++ 2017 TESTS 28 233 409600
100978389 charmander3333 itised C Dec. 11, 2020, 11:29 p.m. OK MS C++ 2017 TESTS 28 234 2048000
100960505 Triss_Merigold C Dec. 11, 2020, 5:12 p.m. OK MS C++ 2017 TESTS 28 234 2048000
100953353 Conata C Dec. 11, 2020, 4:22 p.m. OK MS C++ 2017 TESTS 28 249 2048000
100953236 RabbitPower C Dec. 11, 2020, 4:22 p.m. OK MS C++ 2017 TESTS 28 249 3174400
100981778 megatortik C Dec. 12, 2020, 2:29 a.m. OK MS C++ 2017 TESTS 28 249 3891200
100975222 henrychenOutlook C Dec. 11, 2020, 9:03 p.m. OK Node.js TESTS 28 249 25907200
100975142 henrychenOutlook C Dec. 11, 2020, 9:01 p.m. OK Node.js TESTS 28 265 25907200
100956565 watarimaycry2 C Dec. 11, 2020, 4:32 p.m. OK Node.js TESTS 28 327 30208000
100951996 Geo_Chrys C Dec. 11, 2020, 4:18 p.m. OK Node.js TESTS 28 1419 34918400
100970390 ap1008 C Dec. 11, 2020, 7:18 p.m. OK PyPy 2 TESTS 28 733 8499200
100946918 moriarty1992 C Dec. 11, 2020, 4 p.m. OK PyPy 3 TESTS 28 234 13004800
100963458 s_prateek26 C Dec. 11, 2020, 5:39 p.m. OK PyPy 3 TESTS 28 265 10752000
100959049 kaleabasfaw2010 C Dec. 11, 2020, 5:02 p.m. OK PyPy 3 TESTS 28 280 17305600
100950360 DhurBaal C Dec. 11, 2020, 4:12 p.m. OK PyPy 3 TESTS 28 327 11264000
100983906 Rao_Nishant C Dec. 12, 2020, 3:39 a.m. OK PyPy 3 TESTS 28 358 10956800
100954482 akshitm16 C Dec. 11, 2020, 4:26 p.m. OK PyPy 3 TESTS 28 389 11878400
100977252 uttharapally.chandra C Dec. 11, 2020, 10:25 p.m. OK PyPy 3 TESTS 28 389 13824000
100970054 sul3 C Dec. 11, 2020, 7:11 p.m. OK PyPy 3 TESTS 28 389 14028800
100949555 i_am_trigger C Dec. 11, 2020, 4:09 p.m. OK PyPy 3 TESTS 28 390 11673600
100947631 M0riarty C Dec. 11, 2020, 4:02 p.m. OK PyPy 3 TESTS 28 405 11571200
100980937 ComptineDunAutreEte C Dec. 12, 2020, 1:51 a.m. OK Python 2 TESTS 28 420 6144000
100949542 shade33 C Dec. 11, 2020, 4:09 p.m. OK Python 3 TESTS 28 311 6041600
100947905 itsdebo10 C Dec. 11, 2020, 4:03 p.m. OK Python 3 TESTS 28 311 7987200
100949305 pavanbsp C Dec. 11, 2020, 4:08 p.m. OK Python 3 TESTS 28 326 19251200
100984447 qinghua C Dec. 12, 2020, 3:56 a.m. OK Python 3 TESTS 28 327 7475200
100975234 Gemini7 C Dec. 11, 2020, 9:04 p.m. OK Python 3 TESTS 28 342 7577600
100966908 jatinpapreja C Dec. 11, 2020, 6:23 p.m. OK Python 3 TESTS 28 342 7577600
100965986 timostar1 C Dec. 11, 2020, 6:11 p.m. OK Python 3 TESTS 28 343 7782400
100962799 Achilles221B C Dec. 11, 2020, 5:33 p.m. OK Python 3 TESTS 28 358 7372800
100962233 DisciplinedDragon C Dec. 11, 2020, 5:27 p.m. OK Python 3 TESTS 28 374 7680000
100955715 amisha26 C Dec. 11, 2020, 4:30 p.m. OK Python 3 TESTS 28 389 7475200
100961843 bqn C Dec. 11, 2020, 5:23 p.m. OK Rust TESTS 28 62 4505600
100959413 Trash-iine C Dec. 11, 2020, 5:04 p.m. OK Rust TESTS 28 78 6553600

remove filters

Back to search problems