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 |
---|---|---|---|---|---|---|
1174 | Codeforces Round 563 (Div. 2) | FINISHED | False | 7200 | 172252499 | June 3, 2019, 2:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1456 ) | E | Ehab and the Expected GCD Problem | PROGRAMMING | combinatorics dp math number theory | 2500 |
B"Let's define a function f(p) on a permutation p as follows. Let g_i be the greatest common divisor (GCD) of elements p_1 , p_2 , ..., p_i (in other words, it is the GCD of the prefix of length i ). Then f(p) is the number of distinct elements among g_1 , g_2 , ..., g_n . Let f_{max}(n) be the maximum value of f(p) among all permutations p of integers 1 , 2 , ..., n . Given an integers n , count the number of permutations p of integers 1 , 2 , ..., n , such that f(p) is equal to f_{max}(n) . Since the answer may be large, print the remainder of its division by 1000 ,000 ,007 = 10^9 + 7 . The only line contains the integer n ( 2 <= n <= 10^6 ) -- the length of the permutations. The only line should contain your answer modulo 10^9+7 . Consider the second example: these are the permutations of length 3 : The maximum value f_{max}(3) = 2 , and there are 4 permutations p such that f(p)=2 . "... |
Codeforces round #563 editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
55094025 | WuK | E | June 4, 2019, 4:03 p.m. | OK | GNU C11 | TESTS | 70 | 124 | 32051200 | 2500 | |
55043857 | rainboy | E | June 3, 2019, 3:27 p.m. | OK | GNU C11 | TESTS | 70 | 155 | 0 | 2500 | |
55127698 | llbra9z | E | June 5, 2019, 1:38 p.m. | OK | GNU C11 | TESTS | 70 | 857 | 168345600 | 2500 | |
63929405 | Vectory | E | Oct. 31, 2019, 1:53 p.m. | OK | GNU C++11 | TESTS | 70 | 31 | 0 | 2500 | |
55616249 | jakedavis | E | June 16, 2019, 9:07 a.m. | OK | GNU C++11 | TESTS | 70 | 31 | 7987200 | 2500 | |
55042040 | liu_zhan | E | June 3, 2019, 3:17 p.m. | OK | GNU C++11 | TESTS | 70 | 46 | 7987200 | 2500 | |
55610566 | ReaLNero1 | E | June 16, 2019, 5:24 a.m. | OK | GNU C++11 | TESTS | 70 | 46 | 7987200 | 2500 | |
55090931 | ddytxdy | E | June 4, 2019, 2:30 p.m. | OK | GNU C++11 | TESTS | 70 | 46 | 7987200 | 2500 | |
55088494 | ddytxdy | E | June 4, 2019, 1:31 p.m. | OK | GNU C++11 | TESTS | 70 | 46 | 7987200 | 2500 | |
55044195 | Daniel_Yeh | E | June 3, 2019, 3:29 p.m. | OK | GNU C++11 | TESTS | 70 | 46 | 25088000 | 2500 | |
55097018 | DimmyT | E | June 4, 2019, 5:45 p.m. | OK | GNU C++11 | TESTS | 70 | 46 | 32051200 | 2500 | |
55097070 | DimmyT | E | June 4, 2019, 5:46 p.m. | OK | GNU C++11 | TESTS | 70 | 46 | 32051200 | 2500 | |
64093305 | robin12138 | E | Nov. 2, 2019, 1:14 p.m. | OK | GNU C++11 | TESTS | 70 | 46 | 40038400 | 2500 | |
55066867 | faculty | E | June 4, 2019, 4:10 a.m. | OK | GNU C++14 | TESTS | 70 | 46 | 7987200 | 2500 | |
55420668 | GODF | E | June 11, 2019, 6:15 a.m. | OK | GNU C++14 | TESTS | 70 | 46 | 7987200 | 2500 | |
55074361 | MegaOwIer | E | June 4, 2019, 7:50 a.m. | OK | GNU C++14 | TESTS | 70 | 46 | 7987200 | 2500 | |
55182018 | Jefe | E | June 5, 2019, 11:42 p.m. | OK | GNU C++14 | TESTS | 70 | 46 | 12083200 | 2500 | |
55080317 | cloudsky01 | E | June 4, 2019, 10:26 a.m. | OK | GNU C++14 | TESTS | 70 | 46 | 15974400 | 2500 | |
64555576 | nandonathaniel | E | Nov. 9, 2019, 3:26 a.m. | OK | GNU C++14 | TESTS | 70 | 46 | 32051200 | 2500 | |
55097166 | DimmyT | E | June 4, 2019, 5:50 p.m. | OK | GNU C++14 | TESTS | 70 | 46 | 32256000 | 2500 | |
59130273 | Scut82 | E | Aug. 20, 2019, 10:43 a.m. | OK | GNU C++14 | TESTS | 70 | 61 | 12083200 | 2500 | |
61505313 | ddakji08 | E | Sept. 29, 2019, 2:55 p.m. | OK | GNU C++14 | TESTS | 70 | 61 | 15974400 | 2500 | |
55420548 | GODF | E | June 11, 2019, 6:12 a.m. | OK | GNU C++14 | TESTS | 70 | 62 | 7987200 | 2500 | |
60501646 | oskarfiuk1 | E | Sept. 13, 2019, 7:01 p.m. | OK | GNU C++17 | TESTS | 70 | 31 | 3993600 | 2500 | |
55117020 | nvmdava | E | June 5, 2019, 9:08 a.m. | OK | GNU C++17 | TESTS | 70 | 31 | 16076800 | 2500 | |
55286656 | LayCurse | E | June 8, 2019, 5:22 a.m. | OK | GNU C++17 | TESTS | 70 | 46 | 3993600 | 2500 | |
55072558 | CMXRYNP | E | June 4, 2019, 6:59 a.m. | OK | GNU C++17 | TESTS | 70 | 46 | 7987200 | 2500 | |
59863817 | Cahid | E | Sept. 1, 2019, 4:19 p.m. | OK | GNU C++17 | TESTS | 70 | 46 | 8192000 | 2500 | |
59672450 | S.K | E | Aug. 29, 2019, 4:40 p.m. | OK | GNU C++17 | TESTS | 70 | 46 | 16076800 | 2500 | |
55046759 | DinhDucManhGoldIOI2020 | E | June 3, 2019, 3:46 p.m. | OK | GNU C++17 | TESTS | 70 | 46 | 16076800 | 2500 | |
55045121 | LayCurse | E | June 3, 2019, 3:35 p.m. | OK | GNU C++17 | TESTS | 70 | 46 | 104550400 | 2500 | |
55043163 | Anachor | E | June 3, 2019, 3:23 p.m. | OK | GNU C++17 | TESTS | 70 | 61 | 16076800 | 2500 | |
55053875 | Smaug | E | June 3, 2019, 6:13 p.m. | OK | GNU C++17 | TESTS | 70 | 61 | 16076800 | 2500 | |
57475096 | Darth_Jar_Jar_Binks | E | July 21, 2019, 8:49 p.m. | OK | Java 8 | TESTS | 70 | 124 | 0 | 2500 | |
55065377 | dalt | E | June 4, 2019, 3:11 a.m. | OK | Java 8 | TESTS | 70 | 171 | 6144000 | 2500 | |
55061617 | Dukkha | E | June 3, 2019, 11:30 p.m. | OK | Java 8 | TESTS | 70 | 374 | 0 | 2500 | |
55042160 | uwi | E | June 3, 2019, 3:18 p.m. | OK | Java 8 | TESTS | 70 | 1216 | 3481600 | 2500 | |
55058603 | Dukkha | E | June 3, 2019, 8:26 p.m. | OK | Java 8 | TESTS | 70 | 1450 | 15564800 | 2500 | |
55120272 | Vedensky | E | June 5, 2019, 10:45 a.m. | OK | Kotlin | TESTS | 70 | 1231 | 260403200 | 2500 | |
55065335 | FatXi | E | June 4, 2019, 3:09 a.m. | OK | MS C++ 2017 | TESTS | 70 | 186 | 160358400 | 2500 | |
55062793 | youx | E | June 4, 2019, 12:54 a.m. | OK | MS C++ 2017 | TESTS | 70 | 218 | 0 | 2500 | |
55068348 | Timonnable | E | June 4, 2019, 5:01 a.m. | OK | MS C++ 2017 | TESTS | 70 | 343 | 102400 | 2500 | |
55055635 | bcollet | E | June 3, 2019, 6:52 p.m. | OK | PyPy 2 | TESTS | 70 | 841 | 2867200 | 2500 | |
55106283 | whatshisbucket | E | June 5, 2019, 2:57 a.m. | OK | PyPy 3 | TESTS | 70 | 171 | 204800 | 2500 | |
55074335 | whatshisbucket | E | June 4, 2019, 7:49 a.m. | OK | PyPy 3 | TESTS | 70 | 171 | 8704000 | 2500 | |
55106141 | whatshisbucket | E | June 5, 2019, 2:46 a.m. | OK | PyPy 3 | TESTS | 70 | 187 | 8908800 | 2500 | |
55073940 | whatshisbucket | E | June 4, 2019, 7:39 a.m. | OK | PyPy 3 | TESTS | 70 | 374 | 60416000 | 2500 | |
55073293 | whatshisbucket | E | June 4, 2019, 7:20 a.m. | OK | PyPy 3 | TESTS | 70 | 374 | 60416000 | 2500 | |
55109659 | Aidos | E | June 5, 2019, 5:29 a.m. | OK | PyPy 3 | TESTS | 70 | 639 | 117043200 | 2500 | |
55937662 | erickjohnross | E | June 22, 2019, 2:46 p.m. | OK | PyPy 3 | TESTS | 70 | 670 | 1638400 | 2500 | |
55086002 | Dvali_Gio | E | June 4, 2019, 12:36 p.m. | OK | PyPy 3 | TESTS | 70 | 1465 | 7782400 | 2500 | |
55067325 | whatshisbucket | E | June 4, 2019, 4:26 a.m. | OK | PyPy 3 | TESTS | 70 | 1465 | 7782400 | 2500 | |
63525521 | sansen | E | Oct. 27, 2019, 5:08 a.m. | OK | Rust | TESTS | 70 | 358 | 0 | 2500 | |
63524888 | sansen | E | Oct. 27, 2019, 4:57 a.m. | OK | Rust | TESTS | 70 | 373 | 0 | 2500 |
Back to search problems