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 |
---|---|---|---|---|---|---|
1854 | Codeforces Round 889 (Div. 1) | FINISHED | False | 9000 | 41181899 | July 29, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1532 ) | C | Expected Destruction | PROGRAMMING | dp math probabilities |
B'You have a set S of n distinct integers between 1 and m . Each second you do the following steps: What is the expected number of seconds until S is empty? Output the answer modulo 1 ,000 ,000 ,007 . Formally, let P = 1 ,000 ,000 ,007 . It can be shown that the answer can be expressed as an irreducible fraction frac{a}{b} , where a and b are integers and b not equiv 0 pmod{P} . Output the integer equal to a cdot b^{-1} bmod P . In other words, output an integer z such that 0 <= z < P and z cdot b equiv a pmod{P} . The first line contains two integers n and m ( 1 <= q n <= q m <= q 500 ) -- the number of elements in the set S and the upper bound on the value of the elements in S . The second line contains n integers S_1, ,S_2, , ... , ,S_n ( 1 <= q S_1 < S_2 < ldots < S_n <= q m ) -- the elements of the set S . Output a single integer -- the expected number of seconds until S is empty, modulo 1 ,000 ,000 ,007 . For test 1, here is a list of all the possible scenarios and their probabilities: Adding them up, we get frac{1}{2} cdot 4 + frac{1}{4} cdot 4 + frac{1}{4} cdot 3 = frac{15}{4} . We see that 750000009 cdot 4 equiv 15 pmod{1 ,000 ,000 ,007} . '... |
Editorial of Codeforces Round 889 (Div. 1 + Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
216338043 | KumaTachiRen | C | July 29, 2023, 5:01 p.m. | OK | C# 8 | TESTS | 73 | 577 | 37990400 | ||
216270604 | hos.lyric | C | July 29, 2023, 3:12 p.m. | OK | D | TESTS | 73 | 31 | 13824000 | ||
216378419 | chro4896 | C | July 30, 2023, 12:04 a.m. | OK | GNU C11 | TESTS | 73 | 31 | 2048000 | ||
216307890 | chro4896 | C | July 29, 2023, 4:08 p.m. | OK | GNU C11 | TESTS | 73 | 810 | 2048000 | ||
216390522 | InoueTakina | C | July 30, 2023, 3:43 a.m. | OK | GNU C++14 | TESTS | 73 | 15 | 1024000 | ||
216385172 | legenc6y | C | July 30, 2023, 2:19 a.m. | OK | GNU C++14 | TESTS | 73 | 15 | 1024000 | ||
216261884 | yjxKawaii | C | July 29, 2023, 3 p.m. | OK | GNU C++14 | TESTS | 73 | 15 | 1024000 | ||
216392602 | KurashinaAsuka | C | July 30, 2023, 4:12 a.m. | OK | GNU C++14 | TESTS | 73 | 15 | 1024000 | ||
216274010 | emptyhope | C | July 29, 2023, 3:17 p.m. | OK | GNU C++14 | TESTS | 73 | 15 | 1843200 | ||
216396801 | harinboy | C | July 30, 2023, 5:07 a.m. | OK | GNU C++14 | TESTS | 73 | 15 | 2048000 | ||
216328082 | Noam527 | C | July 29, 2023, 4:43 p.m. | OK | GNU C++14 | TESTS | 73 | 15 | 2150400 | ||
216334973 | grass8sheep | C | July 29, 2023, 4:56 p.m. | OK | GNU C++14 | TESTS | 73 | 30 | 1024000 | ||
216354291 | MCPlayer542 | C | July 29, 2023, 6:41 p.m. | OK | GNU C++14 | TESTS | 73 | 30 | 1024000 | ||
216389899 | Shui_Dream | C | July 30, 2023, 3:34 a.m. | OK | GNU C++14 | TESTS | 73 | 30 | 2048000 | ||
216320969 | gubeiqg | C | July 29, 2023, 4:30 p.m. | OK | GNU C++17 | TESTS | 73 | 15 | 1024000 | ||
216294824 | KroosTheKeenGlint | C | July 29, 2023, 3:47 p.m. | OK | GNU C++17 | TESTS | 73 | 15 | 1024000 | ||
216272596 | hank55663 | C | July 29, 2023, 3:15 p.m. | OK | GNU C++17 | TESTS | 73 | 15 | 1126400 | ||
216374586 | pab2 | C | July 29, 2023, 10:32 p.m. | OK | GNU C++17 | TESTS | 73 | 15 | 1126400 | ||
216310237 | muratt | C | July 29, 2023, 4:11 p.m. | OK | GNU C++17 | TESTS | 73 | 15 | 1126400 | ||
216348456 | anony9999 | C | July 29, 2023, 6:02 p.m. | OK | GNU C++17 | TESTS | 73 | 15 | 2048000 | ||
216287315 | penguinhacker | C | July 29, 2023, 3:36 p.m. | OK | GNU C++17 | TESTS | 73 | 15 | 2048000 | ||
216377189 | Morphymorphymorphy | C | July 29, 2023, 11:32 p.m. | OK | GNU C++17 | TESTS | 73 | 15 | 2048000 | ||
216377400 | AlexanderL | C | July 29, 2023, 11:37 p.m. | OK | GNU C++17 | TESTS | 73 | 15 | 2048000 | ||
216345747 | HOLlC | C | July 29, 2023, 5:49 p.m. | OK | GNU C++17 | TESTS | 73 | 15 | 3072000 | ||
216339130 | hamamu | C | July 29, 2023, 5:02 p.m. | OK | GNU C++17 (64) | TESTS | 73 | 15 | 0 | ||
216319655 | ttttan | C | July 29, 2023, 4:28 p.m. | OK | GNU C++17 (64) | TESTS | 73 | 15 | 1024000 | ||
216401623 | 1205691775 | C | July 30, 2023, 6 a.m. | OK | GNU C++17 (64) | TESTS | 73 | 15 | 1024000 | ||
216399318 | Daniel777 | C | July 30, 2023, 5:35 a.m. | OK | GNU C++17 (64) | TESTS | 73 | 15 | 1024000 | ||
216383394 | zdc123456 | C | July 30, 2023, 1:49 a.m. | OK | GNU C++17 (64) | TESTS | 73 | 15 | 1024000 | ||
216377261 | lunchbox | C | July 29, 2023, 11:34 p.m. | OK | GNU C++17 (64) | TESTS | 73 | 15 | 1024000 | ||
216376846 | ETK. | C | July 29, 2023, 11:24 p.m. | OK | GNU C++17 (64) | TESTS | 73 | 15 | 1024000 | ||
216317075 | heyujun | C | July 29, 2023, 4:23 p.m. | OK | GNU C++17 (64) | TESTS | 73 | 15 | 1024000 | ||
216301555 | PurpleCrayon | C | July 29, 2023, 3:57 p.m. | OK | GNU C++17 (64) | TESTS | 73 | 15 | 1024000 | ||
216299326 | Kubic | C | July 29, 2023, 3:54 p.m. | OK | GNU C++17 (64) | TESTS | 73 | 15 | 1024000 | ||
216290699 | cqbzdj | C | July 29, 2023, 3:41 p.m. | OK | GNU C++20 (64) | TESTS | 73 | 15 | 0 | ||
216339440 | The_Crossing | C | July 29, 2023, 5:03 p.m. | OK | GNU C++20 (64) | TESTS | 73 | 15 | 1024000 | ||
216339051 | zxyhh | C | July 29, 2023, 5:02 p.m. | OK | GNU C++20 (64) | TESTS | 73 | 15 | 1024000 | ||
216324606 | doveLuck | C | July 29, 2023, 4:37 p.m. | OK | GNU C++20 (64) | TESTS | 73 | 15 | 1024000 | ||
216323990 | AmShZ | C | July 29, 2023, 4:36 p.m. | OK | GNU C++20 (64) | TESTS | 73 | 15 | 1024000 | ||
216323469 | MoRanSky | C | July 29, 2023, 4:35 p.m. | OK | GNU C++20 (64) | TESTS | 73 | 15 | 1024000 | ||
216322325 | GusterGoose27 | C | July 29, 2023, 4:33 p.m. | OK | GNU C++20 (64) | TESTS | 73 | 15 | 1024000 | ||
216321640 | KaphI | C | July 29, 2023, 4:32 p.m. | OK | GNU C++20 (64) | TESTS | 73 | 15 | 1024000 | ||
216394975 | conzloi | C | July 30, 2023, 4:43 a.m. | OK | GNU C++20 (64) | TESTS | 73 | 15 | 1024000 | ||
216354991 | silxi | C | July 29, 2023, 6:46 p.m. | OK | GNU C++20 (64) | TESTS | 73 | 15 | 1024000 | ||
216291538 | Tlatoani | C | July 29, 2023, 3:42 p.m. | OK | Kotlin 1.6 | TESTS | 73 | 202 | 0 | ||
216358584 | Omer223 | C | July 29, 2023, 7:19 p.m. | OK | MS C++ 2017 | TESTS | 73 | 31 | 8089600 | ||
216306702 | GeorgesStPierre | C | July 29, 2023, 4:06 p.m. | OK | MS C++ 2017 | TESTS | 73 | 31 | 8089600 | ||
216292563 | bcollet | C | July 29, 2023, 3:43 p.m. | OK | PyPy 2 | TESTS | 73 | 327 | 23142400 | ||
216346877 | toam | C | July 29, 2023, 5:54 p.m. | OK | PyPy 3-64 | TESTS | 73 | 77 | 3993600 | ||
216360185 | codicon | C | July 29, 2023, 7:36 p.m. | OK | PyPy 3-64 | TESTS | 73 | 77 | 4096000 | ||
216266470 | chinerist | C | July 29, 2023, 3:06 p.m. | OK | PyPy 3-64 | TESTS | 73 | 93 | 5222400 | ||
216317307 | titia | C | July 29, 2023, 4:24 p.m. | OK | PyPy 3-64 | TESTS | 73 | 109 | 10956800 | ||
216346076 | dyppp | C | July 29, 2023, 5:50 p.m. | OK | PyPy 3-64 | TESTS | 73 | 109 | 12083200 | ||
216366735 | conqueror_of_tourist | C | July 29, 2023, 8:40 p.m. | OK | PyPy 3-64 | TESTS | 73 | 343 | 57548800 | ||
216341009 | Kita | C | July 29, 2023, 5:04 p.m. | OK | PyPy 3-64 | TESTS | 73 | 763 | 19558400 | ||
216296321 | qwerty787788 | C | July 29, 2023, 3:49 p.m. | OK | Rust 2021 | TESTS | 73 | 15 | 1024000 | ||
216277077 | sansen | C | July 29, 2023, 3:21 p.m. | OK | Rust 2021 | TESTS | 73 | 311 | 1536000 |
Back to search problems