Codeforces Round 733 (Div. 1 + Div. 2, based on VK Cup 2021 - Elimination (Engine))

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
1530 Codeforces Round 733 (Div. 1 + Div. 2, based on VK Cup 2021 - Elimination (Engine)) FINISHED False 10800 110647463 July 17, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 841 ) F Bingo PROGRAMMING bitmasks dp probabilities

B"Getting ready for VK Fest 2021, you prepared a table with n rows and n columns, and filled each cell of this table with some event related with the festival that could either happen or not: for example, whether you will win a prize on the festival, or whether it will rain. Forecasting algorithms used in VK have already estimated the probability for each event to happen. Event in row i and column j will happen with probability a_{i, j} cdot 10^{-4} . All of the events are mutually independent. Let's call the table winning if there exists a line such that all n events on it happen. The line could be any horizontal line (cells (i, 1), (i, 2), ldots, (i, n) for some i ), any vertical line (cells (1, j), (2, j), ldots, (n, j) for some j ), the main diagonal (cells (1, 1), (2, 2), ldots, (n, n) ), or the antidiagonal (cells (1, n), (2, n - 1), ldots, (n, 1) ). Find the probability of your table to be winning, and output it modulo 31 ,607 (see Output section). The first line contains a single integer n ( 2 <= n <= 21 ) -- the dimensions of the table. The i -th of the next n lines contains n integers a_{i, 1}, a_{i, 2}, ldots, a_{i, n} ( 0 < a_{i, j} < 10^4 ). The probability of event in cell (i, j) to happen is a_{i, j} cdot 10^{-4} . Print the probability that your table will be winning, modulo 31 ,607 . Formally, let M = 31 ,607 . It can be shown that the answer can be expressed as an irreducible fraction frac{p}{q} , where p and q are integers and q not equiv 0 pmod{M} . Output the integer equal to p cdot q^{-1} bmod M . In other words, output such an integer x that 0 <= x < M and x cdot q equiv p pmod{M} . In the first example, any two events form a line, and the table will be winning if any two events happen. The probability of this is frac{11}{16} , and 5"...

Tutorials

Codeforces Round #733 Editorial (all problems)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
122864512 rainboy F July 17, 2021, 7:29 p.m. OK GNU C11 TESTS 46 857 28876800
122866029 chitanda F July 17, 2021, 7:46 p.m. OK GNU C++11 TESTS 46 1388 12492800
122869887 rsabcmoi F July 17, 2021, 8:56 p.m. OK GNU C++11 TESTS 46 1840 40550400
122865887 rsabcmoi F July 17, 2021, 7:44 p.m. OK GNU C++11 TESTS 46 1886 40550400
122871630 Ant_Man F July 17, 2021, 9:48 p.m. OK GNU C++11 TESTS 46 2011 3891200
122879131 AQT F July 18, 2021, 2:07 a.m. OK GNU C++11 TESTS 46 2137 214016000
122879161 AQT F July 18, 2021, 2:08 a.m. OK GNU C++11 TESTS 46 2308 214016000
122882649 zhangguangxuan99 F July 18, 2021, 3:20 a.m. OK GNU C++11 TESTS 46 3010 188825600
122879601 TrivialMan F July 18, 2021, 2:18 a.m. OK GNU C++11 TESTS 46 3134 256102400
122887934 Alex_Wei F July 18, 2021, 4:49 a.m. OK GNU C++11 TESTS 46 5958 136806400
122867286 __23333 F July 17, 2021, 8:04 p.m. OK GNU C++11 TESTS 46 6754 415129600
122879996 hank55663 F July 18, 2021, 2:28 a.m. OK GNU C++14 TESTS 46 1232 180224000
122880794 hefan F July 18, 2021, 2:44 a.m. OK GNU C++14 TESTS 46 1809 205516800
122879341 sjcsjcsjc F July 18, 2021, 2:12 a.m. OK GNU C++14 TESTS 46 2058 197529600
122874995 AwakeAnay F July 18, 2021, midnight OK GNU C++14 TESTS 46 2323 365158400
122884684 6aren F July 18, 2021, 3:56 a.m. OK GNU C++14 TESTS 46 3727 241561600
122884901 6aren F July 18, 2021, 3:58 a.m. OK GNU C++14 TESTS 46 3775 241561600
122870769 cuom1999 F July 17, 2021, 9:21 p.m. OK GNU C++14 TESTS 46 5163 373555200
122887021 ngpin04 F July 18, 2021, 4:35 a.m. OK GNU C++14 TESTS 46 5335 108851200
122848839 sjcsjcsjc F July 17, 2021, 5:07 p.m. OK GNU C++14 TESTS 46 6255 197427200
122886829 ngpin04 F July 18, 2021, 4:31 a.m. OK GNU C++14 TESTS 46 6489 213913600
122849819 alireza_kaviani F July 17, 2021, 5:10 p.m. OK GNU C++17 TESTS 46 1060 54169600
122852126 sd0061 F July 17, 2021, 5:17 p.m. OK GNU C++17 TESTS 46 1232 3788800
122870385 peti1234 F July 17, 2021, 9:10 p.m. OK GNU C++17 TESTS 46 1419 188620800
122871269 frokaikan F July 17, 2021, 9:37 p.m. OK GNU C++17 TESTS 46 1715 79360000
122874581 1-gon F July 17, 2021, 11:44 p.m. OK GNU C++17 TESTS 46 1949 180428800
122866755 sam.rei F July 17, 2021, 7:55 p.m. OK GNU C++17 TESTS 46 2043 180224000
122879151 AQT F July 18, 2021, 2:08 a.m. OK GNU C++17 TESTS 46 2043 213913600
122871624 Ant_Man F July 17, 2021, 9:48 p.m. OK GNU C++17 TESTS 46 2121 3788800
122873250 maximumSHOT F July 17, 2021, 10:50 p.m. OK GNU C++17 TESTS 46 2230 188928000
122855439 _h_ F July 17, 2021, 5:27 p.m. OK GNU C++17 TESTS 46 2246 4300800
122870365 rainboy F July 17, 2021, 9:10 p.m. OK GNU C++17 (64) TESTS 46 889 29491200
122868869 Benq F July 17, 2021, 8:33 p.m. OK GNU C++17 (64) TESTS 46 1091 21094400
122866541 dario2994 F July 17, 2021, 7:53 p.m. OK GNU C++17 (64) TESTS 46 1092 4300800
122856428 aaaaajack F July 17, 2021, 5:30 p.m. OK GNU C++17 (64) TESTS 46 1123 197734400
122848763 haruki_K F July 17, 2021, 5:07 p.m. OK GNU C++17 (64) TESTS 46 1216 189337600
122870257 12tqian F July 17, 2021, 9:07 p.m. OK GNU C++17 (64) TESTS 46 1309 4300800
122870338 12tqian F July 17, 2021, 9:09 p.m. OK GNU C++17 (64) TESTS 46 1325 4300800
122864274 evilbuggy F July 17, 2021, 7:27 p.m. OK GNU C++17 (64) TESTS 46 1372 185036800
122889996 triple__a F July 18, 2021, 5:19 a.m. OK GNU C++17 (64) TESTS 46 1387 357580800
122865360 Geothermal F July 17, 2021, 7:37 p.m. OK GNU C++17 (64) TESTS 46 1450 71475200
122854550 chinerist F July 17, 2021, 5:25 p.m. OK PyPy 3 TESTS 46 5771 86323200
122853274 sansen F July 17, 2021, 5:21 p.m. OK Rust TESTS 46 3197 42393600

remove filters

Back to search problems