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 |
---|---|---|---|---|---|---|
1172 | Codeforces Round 564 (Div. 1) | FINISHED | False | 7200 | 177530087 | June 7, 2019, 12:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1112 ) | C1 | Nauuo and Pictures (easy version) | PROGRAMMING | dp probabilities | 2500 |
B'The only difference between easy and hard versions is constraints. Nauuo is a girl who loves random picture websites. One day she made a random picture website by herself which includes n pictures. When Nauuo visits the website, she sees exactly one picture. The website does not display each picture with equal probability. The i -th picture has a non-negative weight w_i , and the probability of the i -th picture being displayed is frac{w_i}{ sum_{j=1}^nw_j} . That is to say, the probability of a picture to be displayed is proportional to its weight. However, Nauuo discovered that some pictures she does not like were displayed too often. To solve this problem, she came up with a great idea: when she saw a picture she likes, she would add 1 to its weight; otherwise, she would subtract 1 from its weight. Nauuo will visit the website m times. She wants to know the expected weight of each picture after all the m visits modulo 998244353 . Can you help her? The expected weight of the i -th picture can be denoted by frac {q_i} {p_i} where gcd(p_i,q_i)=1 , you need to print an integer r_i satisfying 0 <= r_i<998244353 and r_i cdot p_i equiv q_i pmod{998244353} . It can be proved that such r_i exists and is unique. The first line contains two integers n and m ( 1 <= n <= 50 , 1 <= m <= 50 ) -- the number of pictures and the number of visits to the website. The second line contains n integers a_1,a_2, ldots,a_n ( a_i is either 0 or 1 ) -- if a_i=0 , Nauuo does not like the i -th picture; otherwise Nauuo likes the i -th picture. It is guaranteed that there is at least one picture which Nauuo likes. The third line contains n integers w_1,w_2, ldots,w_n ( 1 <= w_i <= 50 ) -- the initial weights of the pictures. The output contains n integers r_1,r_2, ldots,r_n -- the expected wei'... |
Codeforces Round #564 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
55255879 | hos.lyric | C1 | June 7, 2019, 12:48 p.m. | OK | D | TESTS | 75 | 46 | 0 | 2500 | |
55607404 | apiadu | C1 | June 16, 2019, 2:08 a.m. | OK | GNU C++11 | TESTS | 75 | 31 | 0 | 2500 | |
55396426 | WZYYN | C1 | June 10, 2019, 11:59 a.m. | OK | GNU C++11 | TESTS | 75 | 31 | 1740800 | 2500 | |
55305898 | qxforever | C1 | June 8, 2019, 2:23 p.m. | OK | GNU C++11 | TESTS | 75 | 31 | 1740800 | 2500 | |
55260260 | kczno1 | C1 | June 7, 2019, 1:18 p.m. | OK | GNU C++11 | TESTS | 75 | 31 | 1843200 | 2500 | |
55293915 | BigBag | C1 | June 8, 2019, 9 a.m. | OK | GNU C++11 | TESTS | 75 | 31 | 2457600 | 2500 | |
55258572 | MZuev | C1 | June 7, 2019, 1:06 p.m. | OK | GNU C++11 | TESTS | 75 | 31 | 2457600 | 2500 | |
57882598 | AloneKnight | C1 | July 28, 2019, 8:28 a.m. | OK | GNU C++11 | TESTS | 75 | 31 | 37785600 | 2500 | |
55280935 | hangyesheng | C1 | June 8, 2019, 12:48 a.m. | OK | GNU C++11 | TESTS | 75 | 31 | 37785600 | 2500 | |
55264759 | ErkkiErkko | C1 | June 7, 2019, 1:52 p.m. | OK | GNU C++11 | TESTS | 75 | 31 | 37785600 | 2500 | |
55262484 | stal_xy23z7b8 | C1 | June 7, 2019, 1:34 p.m. | OK | GNU C++11 | TESTS | 75 | 31 | 37785600 | 2500 | |
55280664 | newbiegcz | C1 | June 8, 2019, 12:28 a.m. | OK | GNU C++14 | TESTS | 75 | 30 | 37888000 | 2500 | |
55262792 | orz | C1 | June 7, 2019, 1:37 p.m. | OK | GNU C++14 | TESTS | 75 | 31 | 0 | 2500 | |
55268993 | Nyaan | C1 | June 7, 2019, 3:39 p.m. | OK | GNU C++14 | TESTS | 75 | 31 | 102400 | 2500 | |
55307847 | batsumaru | C1 | June 8, 2019, 3:38 p.m. | OK | GNU C++14 | TESTS | 75 | 31 | 204800 | 2500 | |
55272588 | olphe | C1 | June 7, 2019, 5:11 p.m. | OK | GNU C++14 | TESTS | 75 | 31 | 204800 | 2500 | |
55261033 | volamtruyenkyii | C1 | June 7, 2019, 1:24 p.m. | OK | GNU C++14 | TESTS | 75 | 31 | 204800 | 2500 | |
55255981 | hitonanode | C1 | June 7, 2019, 12:49 p.m. | OK | GNU C++14 | TESTS | 75 | 31 | 204800 | 2500 | |
55281606 | shdut | C1 | June 8, 2019, 1:35 a.m. | OK | GNU C++14 | TESTS | 75 | 31 | 1638400 | 2500 | |
55268192 | MegaOwIer | C1 | June 7, 2019, 3:26 p.m. | OK | GNU C++14 | TESTS | 75 | 31 | 1638400 | 2500 | |
55524719 | zhou888 | C1 | June 13, 2019, 10:34 a.m. | OK | GNU C++14 | TESTS | 75 | 31 | 1740800 | 2500 | |
66305462 | user202729_ | C1 | Dec. 5, 2019, 9:10 a.m. | OK | GNU C++17 | TESTS | 75 | 30 | 0 | 2500 | |
55266633 | ei133333 | C1 | June 7, 2019, 2:03 p.m. | OK | GNU C++17 | TESTS | 75 | 30 | 0 | 2500 | |
57455961 | bmerry | C1 | July 21, 2019, 11:38 a.m. | OK | GNU C++17 | TESTS | 75 | 30 | 204800 | 2500 | |
67574063 | Thuleanx | C1 | Dec. 24, 2019, 11:40 p.m. | OK | GNU C++17 | TESTS | 75 | 31 | 0 | 2500 | |
55608239 | square1001 | C1 | June 16, 2019, 3:13 a.m. | OK | GNU C++17 | TESTS | 75 | 31 | 0 | 2500 | |
55279479 | ArshiaDadras | C1 | June 7, 2019, 10:34 p.m. | OK | GNU C++17 | TESTS | 75 | 31 | 0 | 2500 | |
55274466 | neal | C1 | June 7, 2019, 6:07 p.m. | OK | GNU C++17 | TESTS | 75 | 31 | 0 | 2500 | |
55261031 | tatyam | C1 | June 7, 2019, 1:24 p.m. | OK | GNU C++17 | TESTS | 75 | 31 | 0 | 2500 | |
69673617 | cuiaoxiang | C1 | Jan. 28, 2020, 1:41 p.m. | OK | GNU C++17 | TESTS | 75 | 31 | 204800 | 2500 | |
56036989 | Nakagawa.Kanon | C1 | June 25, 2019, 12:32 p.m. | OK | GNU C++17 | TESTS | 75 | 31 | 204800 | 2500 | |
57433889 | Darth_Jar_Jar_Binks | C1 | July 21, 2019, 3:27 a.m. | OK | Java 8 | TESTS | 75 | 124 | 0 | 2500 | |
56775550 | Suzukaze | C1 | July 10, 2019, 2:24 a.m. | OK | Java 8 | TESTS | 75 | 124 | 0 | 2500 | |
55284904 | dalt | C1 | June 8, 2019, 4:10 a.m. | OK | Java 8 | TESTS | 75 | 124 | 0 | 2500 | |
55257389 | uwi | C1 | June 7, 2019, 12:58 p.m. | OK | Java 8 | TESTS | 75 | 218 | 0 | 2500 | |
55257997 | Egor | C1 | June 7, 2019, 1:02 p.m. | OK | Java 8 | TESTS | 75 | 233 | 0 | 2500 | |
55272274 | dusty.and.rusty | C1 | June 7, 2019, 5:02 p.m. | OK | Java 8 | TESTS | 75 | 1106 | 0 | 2500 | |
55277552 | dusty.and.rusty | C1 | June 7, 2019, 8:17 p.m. | OK | Java 8 | TESTS | 75 | 1872 | 0 | 2500 | |
55277746 | dusty.and.rusty | C1 | June 7, 2019, 8:26 p.m. | OK | Java 8 | TESTS | 75 | 2183 | 0 | 2500 | |
57727907 | Spheniscine | C1 | July 25, 2019, 7:43 a.m. | OK | Kotlin | TESTS | 75 | 155 | 204800 | 2500 | |
57723212 | Spheniscine | C1 | July 25, 2019, 6:19 a.m. | OK | Kotlin | TESTS | 75 | 155 | 204800 | 2500 | |
57726344 | Spheniscine | C1 | July 25, 2019, 7:17 a.m. | OK | Kotlin | TESTS | 75 | 155 | 307200 | 2500 | |
57725856 | Spheniscine | C1 | July 25, 2019, 7:07 a.m. | OK | Kotlin | TESTS | 75 | 155 | 307200 | 2500 | |
57724545 | Spheniscine | C1 | July 25, 2019, 6:44 a.m. | OK | Kotlin | TESTS | 75 | 156 | 204800 | 2500 | |
57722669 | Spheniscine | C1 | July 25, 2019, 6:07 a.m. | OK | Kotlin | TESTS | 75 | 156 | 204800 | 2500 | |
57721613 | Spheniscine | C1 | July 25, 2019, 5:39 a.m. | OK | Kotlin | TESTS | 75 | 156 | 307200 | 2500 | |
57719383 | Spheniscine | C1 | July 25, 2019, 4:29 a.m. | OK | Kotlin | TESTS | 75 | 170 | 307200 | 2500 | |
57721811 | Spheniscine | C1 | July 25, 2019, 5:44 a.m. | OK | Kotlin | TESTS | 75 | 171 | 204800 | 2500 | |
57718996 | Spheniscine | C1 | July 25, 2019, 4:15 a.m. | OK | Kotlin | TESTS | 75 | 171 | 307200 | 2500 | |
55271688 | Kiri8128 | C1 | June 7, 2019, 4:43 p.m. | OK | PyPy 3 | TESTS | 75 | 155 | 614400 | 2500 | |
55387907 | iehn | C1 | June 10, 2019, 8:21 a.m. | OK | PyPy 3 | TESTS | 75 | 670 | 40140800 | 2500 | |
55389695 | iehn | C1 | June 10, 2019, 9:07 a.m. | OK | PyPy 3 | TESTS | 75 | 717 | 38502400 | 2500 | |
57809572 | Helli.code | C1 | July 26, 2019, 4:39 p.m. | OK | Python 2 | TESTS | 75 | 187 | 0 | 2500 | |
55389729 | iehn | C1 | June 10, 2019, 9:08 a.m. | OK | Python 3 | TESTS | 75 | 1747 | 33484800 | 2500 | |
55266261 | EbTech | C1 | June 7, 2019, 2:02 p.m. | OK | Rust | TESTS | 75 | 31 | 0 | 2500 | |
55275357 | kobae964 | C1 | June 7, 2019, 6:40 p.m. | OK | Rust | TESTS | 75 | 31 | 102400 | 2500 | |
67509085 | gearjack | C1 | Dec. 24, 2019, 8:29 a.m. | OK | Rust | TESTS | 75 | 202 | 2662400 | 2500 |
Back to search problems