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 |
|---|---|---|---|---|---|---|
| 2020 | Codeforces Round 976 (Div. 2) and Divide By Zero 9.0 | FINISHED | False | 7200 | 48781523 | Sept. 29, 2024, 3:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 264 ) | F | Count Leaves | PROGRAMMING | dp math number theory |
Let (n) and (d) be positive integers. We build the the divisor tree (T_{n,d}) as follows: The root of the tree is a node marked with number (n). This is the (0)-th layer of the tree. For each (i) from (0) to (d - 1), for each vertex of the (i)-th layer, do the following. If the current vertex is marked with (x), create its children and mark them with all possible distinct divisors(^\dagger) of (x). These children will be in the ((i+1))-st layer. The vertices on the (d)-th layer are the leaves of the tree. For example, (T_{6,2}) (the divisor tree for (n = 6) and (d = 2)) looks like this: Define (f(n,d)) as the number of leaves in (T_{n,d}). Given integers (n), (k), and (d), please compute (\sum\limits_{i=1}^{n} f(i^k,d)), modulo (10^9+7). (^\dagger) In this problem, we say that an integer (y) is a divisor of (x) if (y \ge 1) and there exists an integer (z) such that (x = y \cdot z). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The only line of each test case contains three integers (n), (k), and (d) ((1 \le n \le 10^9), (1 \le k,d \le 10^5)). It is guaranteed that the sum of (n) over all test cases does not exceed (10^9). For each test case, output (\sum\limits_{i=1}^{n} f(i^k,d)), modulo (10^9+7). In the first test case, (n = 6), (k = 1), and (d = 1). Thus, we need to find the total number of leaves in the divisor trees (T_{1,1}), (T_{2,1}), (T_{3,1}), (T_{4,1}), (T_{5,1}), (T_{6,1}). (T_{1,1}) has only one leaf, which is marked with (1). (T_{2,1}) has two leaves, marked with (1) and (2). (T_{3,1}) has two leaves, marked with (1) and (3). (T_{4,1}) has three leaves, marked with (1), (2), and (4). $$$T_ |
| Tutorial for Codeforces Round 976 (Div. 2) and Divide By Zero 9.0 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 283679723 | neal | F | Sept. 29, 2024, 9:35 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 1827 | 61542400 | ||
| 283707888 | copyPast77 | F | Sept. 30, 2024, 5:34 a.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 2562 | 82022400 | ||
| 283679180 | lcyxds | F | Sept. 29, 2024, 9:26 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 3061 | 33280000 | ||
| 283680351 | Sparkle_Twilight | F | Sept. 29, 2024, 9:46 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 3577 | 81203200 | ||
| 283677624 | piyush_pransukhka | F | Sept. 29, 2024, 9:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 765 | 40550400 | ||
| 283693192 | propane | F | Sept. 30, 2024, 2:31 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 874 | 111308800 | ||
| 283661196 | Yoshinow2001 | F | Sept. 29, 2024, 6:42 p.m. | OK | C++20 (GCC 13-64) | TESTS | 79 | 905 | 31436800 | ||
| 283696131 | propane | F | Sept. 30, 2024, 3:12 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 1108 | 111308800 | ||
| 283679719 | neal | F | Sept. 29, 2024, 9:35 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 1233 | 61235200 | ||
| 283656899 | G2Esports | F | Sept. 29, 2024, 5:34 p.m. | OK | C++20 (GCC 13-64) | TESTS | 79 | 1328 | 165990400 | ||
| 283681228 | 415411 | F | Sept. 29, 2024, 10:01 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 1530 | 36147200 | ||
| 283656890 | zzpcd | F | Sept. 29, 2024, 5:34 p.m. | OK | C++20 (GCC 13-64) | TESTS | 79 | 1562 | 254259200 | ||
| 283679745 | andreyDagger | F | Sept. 29, 2024, 9:35 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 1624 | 82636800 | ||
| 283707538 | Lackofgod | F | Sept. 30, 2024, 5:31 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 1686 | 120320000 | ||
| 283673736 | Be_dos | F | Sept. 29, 2024, 8:15 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 1109 | 117862400 | ||
| 283667615 | neal | F | Sept. 29, 2024, 7:18 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 1171 | 61440000 | ||
| 283696702 | kaixinw | F | Sept. 30, 2024, 3:20 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 1234 | 128307200 | ||
| 283695555 | RongYuzz | F | Sept. 30, 2024, 3:04 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 1234 | 128307200 | ||
| 283707260 | _MASSIMO_ | F | Sept. 30, 2024, 5:28 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 1343 | 56627200 | ||
| 283678823 | lcyxds | F | Sept. 29, 2024, 9:21 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 1467 | 33484800 | ||
| 283679264 | lcyxds | F | Sept. 29, 2024, 9:28 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 1499 | 33075200 | ||
| 283679776 | neal | F | Sept. 29, 2024, 9:36 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 1562 | 59699200 | ||
| 283683306 | ecnerwala | F | Sept. 29, 2024, 10:50 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 1905 | 27033600 | ||
| 283702352 | ETO-leader | F | Sept. 30, 2024, 4:34 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 2046 | 257126400 |
Back to search problems