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 |
---|---|---|---|---|---|---|
1924 | Codeforces Round 921 (Div. 1) | FINISHED | False | 7200 | 30813263 | Jan. 27, 2024, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 445 ) | E | Paper Cutting Again | PROGRAMMING | combinatorics probabilities |
B'There is a rectangular sheet of paper with initial height n and width m . Let the current height and width be h and w respectively. We introduce a xy -coordinate system so that the four corners of the sheet are (0, 0), (w, 0), (0, h) , and (w, h) . The sheet can then be cut along the lines x = 1,2, ldots,w-1 and the lines y = 1,2, ldots,h-1 . In each step, the paper is cut randomly along any one of these h+w-2 lines. After each vertical and horizontal cut, the right and bottom piece of paper respectively are discarded. Find the expected number of steps required to make the area of the sheet of paper strictly less than k . It can be shown that this answer can always be expressed as a fraction dfrac{p}{q} where p and q are coprime integers. Calculate p cdot q^{-1} bmod (10^9+7) . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 57000 ). Description of the test cases follows. The first line of each test case contains 3 integers n , m , and k ( 1 <= n, m <= 10^6 , 2 <= k <= 10^{12} ). It is guaranteed that the sum of n and the sum of m over all test cases do not exceed 10^6 . For each test case, print one integer -- the answer to the problem. For the first test case, the area is already less than 10 so no cuts are required. For the second test case, the area is exactly 8 so any one of the 4 possible cuts would make the area strictly less than 8 . For the third test case, the final answer is frac{17}{6} = 833 ,333 ,342 bmod (10^9+7) . For the fourth test case, the final answer is frac{5}{4} = 250 ,000 ,003 bmod (10^9+7) . '... |
Codeforces Round 921 (Div. 1, Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
243669245 | alireza_kaviani | E | Jan. 27, 2024, 7:10 p.m. | OK | GNU C++17 | TESTS | 50 | 155 | 16076800 | ||
243643653 | hos.lyric | E | Jan. 27, 2024, 4:22 p.m. | OK | GNU C++17 | TESTS | 50 | 156 | 32358400 | ||
243676875 | radoslav11 | E | Jan. 27, 2024, 8:12 p.m. | OK | GNU C++17 | TESTS | 50 | 202 | 25190400 | ||
243647040 | potato167 | E | Jan. 27, 2024, 4:28 p.m. | OK | GNU C++17 | TESTS | 50 | 685 | 48435200 | ||
243642725 | Elegia | E | Jan. 27, 2024, 4:21 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 62 | 24064000 | ||
243649183 | 244mhq | E | Jan. 27, 2024, 4:32 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 108 | 32051200 | ||
243655474 | Rebelz | E | Jan. 27, 2024, 4:43 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 109 | 32051200 | ||
243667873 | hitonanode | E | Jan. 27, 2024, 6:59 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 109 | 38502400 | ||
243649002 | -Eternity- | E | Jan. 27, 2024, 4:32 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 124 | 32051200 | ||
243664858 | Crystally | E | Jan. 27, 2024, 6:43 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 124 | 64102400 | ||
243669011 | hitonanode | E | Jan. 27, 2024, 7:08 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 140 | 39116800 | ||
243699222 | xuanxuan001 | E | Jan. 28, 2024, 2:56 a.m. | OK | GNU C++17 (64) | TESTS | 50 | 156 | 15974400 | ||
243699262 | luogu_bot1 | E | Jan. 28, 2024, 2:57 a.m. | OK | GNU C++17 (64) | TESTS | 50 | 187 | 15974400 | ||
243697360 | orzdevinwang | E | Jan. 28, 2024, 2:26 a.m. | OK | GNU C++17 (64) | TESTS | 50 | 187 | 24064000 | ||
243695709 | your_submissions_ | E | Jan. 28, 2024, 1:59 a.m. | OK | GNU C++20 (64) | TESTS | 50 | 77 | 7987200 | ||
243623598 | A_G | E | Jan. 27, 2024, 3:51 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 77 | 7987200 | ||
243683383 | AmirAli-Asgari | E | Jan. 27, 2024, 9:26 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 77 | 32051200 | ||
243665026 | kotatsugame | E | Jan. 27, 2024, 6:44 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 78 | 8396800 | ||
243625417 | maroonrk | E | Jan. 27, 2024, 3:54 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 93 | 33587200 | ||
243665303 | AmazingTalker_Frank | E | Jan. 27, 2024, 6:46 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 124 | 32051200 | ||
243642282 | cnnfls_csy | E | Jan. 27, 2024, 4:20 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 124 | 32051200 | ||
243635575 | maspy | E | Jan. 27, 2024, 4:09 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 124 | 41779200 | ||
243630255 | jiangly | E | Jan. 27, 2024, 4:01 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 124 | 50585600 | ||
243706048 | superguymj | E | Jan. 28, 2024, 4:32 a.m. | OK | GNU C++20 (64) | TESTS | 50 | 171 | 48128000 | ||
243641109 | FastFreeTask | E | Jan. 27, 2024, 4:18 p.m. | OK | Kotlin 1.7 | TESTS | 50 | 577 | 11264000 | ||
243648905 | chinerist | E | Jan. 27, 2024, 4:32 p.m. | OK | PyPy 3-64 | TESTS | 50 | 311 | 27852800 | ||
243652079 | sansen | E | Jan. 27, 2024, 4:37 p.m. | OK | Rust 2021 | TESTS | 50 | 77 | 27545600 |
Back to search problems