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 |
|---|---|---|---|---|---|---|
| 2006 | Codeforces Round 969 (Div. 1) | FINISHED | False | 9000 | 51377123 | Aug. 30, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 977 ) | D | Iris and Adjacent Products | PROGRAMMING | divide and conquer math |
Iris has just learned multiplication in her Maths lessons. However, since her brain is unable to withstand too complex calculations, she could not multiply two integers with the product greater than (k) together. Otherwise, her brain may explode! Her teacher sets a difficult task every day as her daily summer holiday homework. Now she is given an array (a) consisting of (n) elements, and she needs to calculate the product of each two adjacent elements (that is, (a_1 \cdot a_2), (a_2 \cdot a_3), and so on). Iris wants her brain to work safely, and in order to do that, she would like to modify the array (a) in such a way that (a_i \cdot a_{i + 1} \leq k) holds for every (1 \leq i < n). There are two types of operations she can perform: She can rearrange the elements of the array (a) in an arbitrary way. She can select an arbitrary element of the array (a) and change its value to an arbitrary integer from (1) to (k). Iris wants to minimize the number of operations of type (2) that she uses. However, that's completely not the end of the summer holiday! Summer holiday lasts for (q) days, and on the (i)-th day, Iris is asked to solve the Math homework for the subarray (b_{l_i}, b_{l_i + 1}, \ldots, b_{r_i}). Help Iris and tell her the minimum number of type (2) operations she needs to perform for each day. Note that the operations are independent for each day, i.e. the array (b) is not changed. Each test consists of multiple test cases. The first line contains a single integer (t) ((1 \leq t \leq 5\cdot 10^4)) — the number of test cases. The description of the test cases follows. The first line of each test case contains three integers (n), (q) and (k) ((2 \leq n \leq 10^5), (1 \leq q \leq 10^5), (1 \leq k \leq 10^6)) — the length of array (b), the number of days, and the upper bound for the multiplication calculation. The second line of each test case con |
| Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 278821123 | liuhengxi | D | Aug. 30, 2024, 3:52 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 281 | 3276800 | ||
| 278813203 | Um_nik | D | Aug. 30, 2024, 3:34 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 296 | 1740800 | ||
| 278851935 | skywalkert | D | Aug. 30, 2024, 6:44 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 374 | 2867200 | ||
| 278880239 | jinqihao2026 | D | Aug. 31, 2024, 3:53 a.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 374 | 4505600 | ||
| 278808929 | zeliboba | D | Aug. 30, 2024, 3:25 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 421 | 819200 | ||
| 278866020 | wcdr | D | Aug. 30, 2024, 10:15 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 421 | 6656000 | ||
| 278840998 | 79brue | D | Aug. 30, 2024, 4:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 437 | 2048000 | ||
| 278836644 | leinad2 | D | Aug. 30, 2024, 4:41 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 468 | 2867200 | ||
| 278831276 | potato167 | D | Aug. 30, 2024, 4:23 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 483 | 9523200 | ||
| 278840943 | Kilani | D | Aug. 30, 2024, 4:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 499 | 2867200 | ||
| 278828910 | StarVeil | D | Aug. 30, 2024, 4:15 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 249 | 6553600 | ||
| 278877104 | wdnmdwrnmmp | D | Aug. 31, 2024, 3:07 a.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 281 | 102400 | ||
| 278818422 | Kapt | D | Aug. 30, 2024, 3:45 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 296 | 102400 | ||
| 278847418 | Sulfox | D | Aug. 30, 2024, 6:03 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 296 | 13619200 | ||
| 278841423 | Savior-of-Cross | D | Aug. 30, 2024, 5 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 311 | 3788800 | ||
| 278846896 | HHY_zZhu | D | Aug. 30, 2024, 5:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 312 | 2048000 | ||
| 278825437 | Ormlis | D | Aug. 30, 2024, 4:05 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 327 | 16179200 | ||
| 278827470 | red-stone | D | Aug. 30, 2024, 4:11 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 328 | 19046400 | ||
| 278831057 | fallleaves01 | D | Aug. 30, 2024, 4:22 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 343 | 1024000 | ||
| 278838037 | risujiroh | D | Aug. 30, 2024, 4:46 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 343 | 2150400 | ||
| 278824725 | cmk666 | D | Aug. 30, 2024, 4:03 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 39 | 281 | 2969600 | ||
| 278829771 | Fido_Puppy | D | Aug. 30, 2024, 4:18 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 39 | 437 | 2560000 | ||
| 278850282 | ImmortaLimit | D | Aug. 30, 2024, 6:28 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 39 | 437 | 22118400 | ||
| 278858205 | RED_INSIDE | D | Aug. 30, 2024, 8 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 39 | 593 | 201420800 | ||
| 278824274 | jiangbowen | D | Aug. 30, 2024, 4:01 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 39 | 671 | 6860800 | ||
| 278866046 | neal | D | Aug. 30, 2024, 10:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 39 | 686 | 102400 | ||
| 278865850 | neal | D | Aug. 30, 2024, 10:11 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 39 | 686 | 102400 | ||
| 278865731 | neal | D | Aug. 30, 2024, 10:09 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 39 | 718 | 3276800 | ||
| 278865920 | neal | D | Aug. 30, 2024, 10:13 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 39 | 811 | 2867200 | ||
| 278853833 | Ianlw | D | Aug. 30, 2024, 7:05 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 39 | 842 | 8499200 | ||
| 278850526 | misorin | D | Aug. 30, 2024, 6:30 p.m. | OK | PyPy 3-64 | TESTS | 39 | 1343 | 20992000 |
Back to search problems