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 |
|---|---|---|---|---|---|---|
| 1152 | Codeforces Round 554 (Div. 2) | FINISHED | False | 7200 | 220289123 | April 24, 2019, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 754 ) | F1 | Neko Rules the Catniverse (Small Version) | PROGRAMMING | bitmasks dp matrices | 2900 |
This problem is same as the next one, but has smaller constraints. Aki is playing a new video game. In the video game, he will control Neko, the giant cat, to fly between planets in the Catniverse. There are n planets in the Catniverse, numbered from 1 to n . At the beginning of the game, Aki chooses the planet where Neko is initially located. Then Aki performs k - 1 moves, where in each move Neko is moved from the current planet x to some other planet y such that: This way, Neko will visit exactly k different planets. Two ways of visiting planets are called different if there is some index i such that the i -th planet visited in the first way is different from the i -th planet visited in the second way. What is the total number of ways to visit k planets this way? Since the answer can be quite large, print it modulo 10^9 + 7 . The only line contains three integers n , k and m ( 1 <= n <= 10^5 , 1 <= k <= min(n, 12) , 1 <= m <= 4 ) -- the number of planets in the Catniverse, the number of planets Neko needs to visit and the said constant m . Print exactly one integer -- the number of different ways Neko can visit exactly k planets. Since the answer can be quite large, print it modulo 10^9 + 7 . In the first example, there are 4 ways Neko can visit all the planets: In the second example, there are 9 ways Neko can visit exactly 2 planets: In the third example, with m = 4 , Neko can visit all the planets in any order, so there are 5! = 120 ways Neko can visit all the planets. In the fourth example, Neko only visit exactly 1 planet (which is also the planet he initially located), and there are 100 ways to choose the starting planet for Neko. |
| T |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 53268223 | mmmod_lqs | F1 | April 25, 2019, 3:55 a.m. | OK | GNU C++11 | TESTS | 85 | 31 | 102400 | 2900 | |
| 53492151 | dpkun | F1 | April 29, 2019, 9:24 a.m. | OK | GNU C++11 | TESTS | 85 | 31 | 1945600 | 2900 | |
| 53268150 | mmmod_lqs | F1 | April 25, 2019, 3:51 a.m. | OK | GNU C++11 | TESTS | 85 | 46 | 102400 | 2900 | |
| 53490632 | Master_Yi | F1 | April 29, 2019, 8:24 a.m. | OK | GNU C++11 | TESTS | 85 | 109 | 819200 | 2900 | |
| 53270537 | lintoto | F1 | April 25, 2019, 5:55 a.m. | OK | GNU C++11 | TESTS | 85 | 155 | 83353600 | 2900 | |
| 54873310 | vjudge3 | F1 | May 31, 2019, 10:30 a.m. | OK | GNU C++11 | TESTS | 85 | 171 | 1024000 | 2900 | |
| 58682151 | code_struck | F1 | Aug. 12, 2019, 7:35 p.m. | OK | GNU C++11 | TESTS | 85 | 186 | 409600 | 2900 | |
| 53490357 | Fister | F1 | April 29, 2019, 8:10 a.m. | OK | GNU C++11 | TESTS | 85 | 186 | 1228800 | 2900 | |
| 53559650 | tlnllkbp | F1 | April 30, 2019, 8:40 a.m. | OK | GNU C++11 | TESTS | 85 | 202 | 83763200 | 2900 | |
| 53496657 | ffffxk | F1 | April 29, 2019, 12:09 p.m. | OK | GNU C++11 | TESTS | 85 | 218 | 83353600 | 2900 | |
| 53314742 | duxing201606 | F1 | April 26, 2019, 9:26 a.m. | OK | GNU C++14 | TESTS | 85 | 31 | 204800 | 2900 | |
| 53265599 | zsyzsy | F1 | April 25, 2019, 1:06 a.m. | OK | GNU C++14 | TESTS | 85 | 77 | 102400 | 2900 | |
| 53384234 | yybyyb | F1 | April 27, 2019, 2:20 a.m. | OK | GNU C++14 | TESTS | 85 | 139 | 83456000 | 2900 | |
| 53946784 | mobu233 | F1 | May 10, 2019, 7:12 a.m. | OK | GNU C++14 | TESTS | 85 | 140 | 83353600 | 2900 | |
| 53246634 | dreamoon_love_AA | F1 | April 24, 2019, 3:52 p.m. | OK | GNU C++14 | TESTS | 85 | 156 | 16281600 | 2900 | |
| 53274082 | Minnakhmetov | F1 | April 25, 2019, 8:21 a.m. | OK | GNU C++14 | TESTS | 85 | 156 | 83353600 | 2900 | |
| 54527095 | Demerzel_IV | F1 | May 23, 2019, 3:02 p.m. | OK | GNU C++14 | TESTS | 85 | 186 | 83353600 | 2900 | |
| 53684349 | fmota | F1 | May 2, 2019, 10:21 p.m. | OK | GNU C++14 | TESTS | 85 | 202 | 83456000 | 2900 | |
| 53286851 | Bohun | F1 | April 25, 2019, 2:12 p.m. | OK | GNU C++14 | TESTS | 85 | 202 | 96153600 | 2900 | |
| 54422954 | remember | F1 | May 20, 2019, 4:34 p.m. | OK | GNU C++14 | TESTS | 85 | 217 | 120217600 | 2900 | |
| 55611106 | ReaLNero1 | F1 | June 16, 2019, 5:46 a.m. | OK | GNU C++17 | TESTS | 85 | 31 | 409600 | 2900 | |
| 53282802 | lqs2015 | F1 | April 25, 2019, 12:42 p.m. | OK | GNU C++17 | TESTS | 85 | 31 | 409600 | 2900 | |
| 53285817 | zhongyuwei | F1 | April 25, 2019, 1:51 p.m. | OK | GNU C++17 | TESTS | 85 | 171 | 83353600 | 2900 | |
| 53253175 | KrK | F1 | April 24, 2019, 4:23 p.m. | OK | GNU C++17 | TESTS | 85 | 171 | 83353600 | 2900 | |
| 53423261 | Als123 | F1 | April 27, 2019, 12:28 p.m. | OK | GNU C++17 | TESTS | 85 | 171 | 179609600 | 2900 | |
| 53494538 | Yi.Daozhiling | F1 | April 29, 2019, 10:59 a.m. | OK | GNU C++17 | TESTS | 85 | 187 | 819200 | 2900 | |
| 53264234 | lmiskiew | F1 | April 24, 2019, 11:22 p.m. | OK | GNU C++17 | TESTS | 85 | 187 | 89804800 | 2900 | |
| 53272548 | yht_boyfriend | F1 | April 25, 2019, 7:21 a.m. | OK | GNU C++17 | TESTS | 85 | 202 | 0 | 2900 | |
| 60769787 | llbra9z | F1 | Sept. 18, 2019, 12:17 p.m. | OK | GNU C++17 | TESTS | 85 | 233 | 89804800 | 2900 | |
| 53488774 | wwwxxxddd | F1 | April 29, 2019, 6:51 a.m. | OK | GNU C++17 | TESTS | 85 | 233 | 128307200 | 2900 | |
| 53313783 | dalt | F1 | April 26, 2019, 8:48 a.m. | OK | Java 8 | TESTS | 85 | 904 | 258764800 | 2900 |
Back to search problems