Codeforces Round 553 (Div. 2)

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
1151 Codeforces Round 553 (Div. 2) FINISHED False 7200 176221499 April 18, 2019, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1244 ) F Sonya and Informatics PROGRAMMING combinatorics dp matrices probabilities 2500

B"A girl named Sonya is studying in the scientific lyceum of the Kingdom of Kremland. The teacher of computer science (Sonya's favorite subject!) invented a task for her. Given an array a of length n , consisting only of the numbers 0 and 1 , and the number k . Exactly k times the following happens: Sonya's task is to find the probability that after all the operations are completed, the a array will be sorted in non-decreasing order. She turned to you for help. Help Sonya solve this problem. It can be shown that the desired probability is either 0 or it can be represented as dfrac{P}{Q} , where P and Q are coprime integers and Q not equiv 0~ pmod {10^9+7} . The first line contains two integers n and k ( 2 <= q n <= q 100, 1 <= q k <= q 10^9 ) -- the length of the array a and the number of operations. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 1 ) -- the description of the array a . If the desired probability is 0 , print 0 , otherwise print the value P cdot Q^{-1} pmod {10^9+7} , where P and Q are defined above. In the first example, all possible variants of the final array a , after applying exactly two operations: (0, 1, 0) , (0, 0, 1) , (1, 0, 0) , (1, 0, 0) , (0, 1, 0) , (0, 0, 1) , (0, 0, 1) , (1, 0, 0) , (0, 1, 0) . Therefore, the answer is dfrac{3}{9}= dfrac{1}{3} . In the second example, the array will not be sorted in non-decreasing order after one operation, therefore the answer is 0 . "...

Tutorials

Codeforces Round #553 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52977017 sansen F April 18, 2019, 4:54 p.m. OK GNU C11 TESTS 77 46 0 2500
53831627 about F May 6, 2019, 8:32 p.m. OK GNU C11 TESTS 77 46 14643200 2500
53099577 t.dasha F April 21, 2019, 3:36 p.m. OK GNU C++11 TESTS 77 46 102400 2500
54821491 e0210206 F May 30, 2019, 3:13 a.m. OK GNU C++11 TESTS 77 46 102400 2500
54476936 cyf32768 F May 22, 2019, 9 a.m. OK GNU C++11 TESTS 77 46 102400 2500
53864809 Malomalomalomalo F May 8, 2019, 2:19 a.m. OK GNU C++11 TESTS 77 46 204800 2500
52983909 HIT_Zero F April 18, 2019, 6:18 p.m. OK GNU C++11 TESTS 77 46 307200 2500
54840210 litble F May 30, 2019, 12:27 p.m. OK GNU C++11 TESTS 77 46 409600 2500
53730100 chenyuqi0215 F May 4, 2019, 6:45 a.m. OK GNU C++11 TESTS 77 46 819200 2500
52999304 FluffyBunnyT F April 19, 2019, 6:12 a.m. OK GNU C++11 TESTS 77 61 614400 2500
53496775 vjudge1 F April 29, 2019, 12:14 p.m. OK GNU C++11 TESTS 77 61 614400 2500
52977542 NephrenRuqInsania F April 18, 2019, 4:58 p.m. OK GNU C++11 TESTS 77 61 716800 2500
52993396 cjtoribio F April 19, 2019, 1:15 a.m. OK GNU C++14 TESTS 77 46 0 2500
52973403 ecnerwala F April 18, 2019, 4:33 p.m. OK GNU C++14 TESTS 77 46 0 2500
52998241 FallingStar F April 19, 2019, 5:34 a.m. OK GNU C++14 TESTS 77 46 0 2500
55611122 ReaLNero1 F June 16, 2019, 5:47 a.m. OK GNU C++14 TESTS 77 46 0 2500
52981086 natsugiri F April 18, 2019, 5:23 p.m. OK GNU C++14 TESTS 77 46 102400 2500
52997027 Cinnamoroll F April 19, 2019, 4:42 a.m. OK GNU C++14 TESTS 77 46 204800 2500
53053511 waynetuinfor F April 20, 2019, 3:56 p.m. OK GNU C++14 TESTS 77 46 204800 2500
54467550 mobu233 F May 22, 2019, 1:55 a.m. OK GNU C++14 TESTS 77 46 307200 2500
52992245 risujiroh F April 18, 2019, 11:43 p.m. OK GNU C++14 TESTS 77 46 307200 2500
69290157 Rubikun F Jan. 22, 2020, 9:54 a.m. OK GNU C++14 TESTS 77 46 409600 2500
52969000 square1001 F April 18, 2019, 4:12 p.m. OK GNU C++17 TESTS 77 46 0 2500
52980639 mango_lassi F April 18, 2019, 5:20 p.m. OK GNU C++17 TESTS 77 46 102400 2500
52980874 xpchf F April 18, 2019, 5:22 p.m. OK GNU C++17 TESTS 77 46 102400 2500
53032663 zstu_jack F April 20, 2019, 3:01 a.m. OK GNU C++17 TESTS 77 46 204800 2500
54648677 Splashing F May 26, 2019, 3:25 a.m. OK GNU C++17 TESTS 77 46 204800 2500
53055161 0442A403 F April 20, 2019, 4:54 p.m. OK GNU C++17 TESTS 77 46 204800 2500
53092326 zhongyuwei F April 21, 2019, 11:50 a.m. OK GNU C++17 TESTS 77 46 307200 2500
53018236 kidddddddddddddddddddddd F April 19, 2019, 3:13 p.m. OK GNU C++17 TESTS 77 46 409600 2500
53019635 sai F April 19, 2019, 3:49 p.m. OK GNU C++17 TESTS 77 46 716800 2500
53125560 cat_of_orange F April 22, 2019, 1:42 p.m. OK GNU C++17 TESTS 77 46 1024000 2500
52986374 Kuzey F April 18, 2019, 7:06 p.m. OK Go TESTS 77 421 0 2500
53076890 Darth_Jar_Jar_Binks F April 20, 2019, 10:16 p.m. OK Java 8 TESTS 77 171 0 2500
53114647 zhishou F April 22, 2019, 7 a.m. OK Java 8 TESTS 77 187 0 2500
53114906 zhishou F April 22, 2019, 7:13 a.m. OK Java 8 TESTS 77 202 0 2500
52998931 uwi F April 19, 2019, 5:59 a.m. OK Java 8 TESTS 77 202 0 2500
52988388 Suunn F April 18, 2019, 8:07 p.m. OK Java 8 TESTS 77 265 86528000 2500
53264729 Savchuk_vlad F April 25, 2019, 12:05 a.m. OK Java 8 TESTS 77 280 0 2500
53174608 Suzukaze F April 23, 2019, 2:29 a.m. OK Java 8 TESTS 77 404 0 2500
53051677 beroul F April 20, 2019, 2:56 p.m. OK Java 8 TESTS 77 405 0 2500
53006266 wadissimo F April 19, 2019, 9:44 a.m. OK Java 8 TESTS 77 732 0 2500
53172241 mikkk F April 22, 2019, 11:08 p.m. OK Java 8 TESTS 77 889 0 2500
52993258 TrabajoNocturno F April 19, 2019, 1:06 a.m. OK Mono C# TESTS 77 186 72294400 2500
53029807 sergmel F April 19, 2019, 10:14 p.m. OK Mono C# TESTS 77 374 7168000 2500
54852738 claw88 F May 30, 2019, 5:28 p.m. OK Mono C# TESTS 77 717 6758400 2500
54703545 camypaper F May 27, 2019, 2:54 a.m. OK Mono C# TESTS 77 733 6758400 2500
53192503 S.K F April 23, 2019, 1:33 p.m. OK MS C++ TESTS 77 93 716800 2500
53193138 S.K F April 23, 2019, 1:50 p.m. OK MS C++ TESTS 77 779 716800 2500
53192576 S.K F April 23, 2019, 1:35 p.m. OK MS C++ TESTS 77 826 614400 2500
53014674 SendThemToHell F April 19, 2019, 1:39 p.m. OK MS C++ 2017 TESTS 77 655 307200 2500
53295593 Helli.code F April 25, 2019, 5:29 p.m. OK PyPy 2 TESTS 77 607 6656000 2500
52993440 meooow F April 19, 2019, 1:19 a.m. OK PyPy 3 TESTS 77 420 7782400 2500
52989985 sparkyyyy F April 18, 2019, 9:11 p.m. OK PyPy 3 TESTS 77 561 6451200 2500
52985834 Kiri8128 F April 18, 2019, 6:53 p.m. OK PyPy 3 TESTS 77 561 6553600 2500
53092314 kctong529 F April 21, 2019, 11:49 a.m. OK PyPy 3 TESTS 77 670 8089600 2500
53317784 CountZero F April 26, 2019, 11:22 a.m. OK Rust TESTS 77 280 204800 2500

remove filters

Back to search problems