Codeforces Round 554 (Div. 2)

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.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 919 ) F2 Neko Rules the Catniverse (Large Version) PROGRAMMING bitmasks dp matrices 2900

This problem is same as the previous one, but has larger 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^9 , 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.

Tutorials

T

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
53492157 dpkun F2 April 29, 2019, 9:25 a.m. OK GNU C++11 TESTS 160 31 1945600 2900
53268210 mmmod_lqs F2 April 25, 2019, 3:54 a.m. OK GNU C++11 TESTS 160 46 102400 2900
53268144 mmmod_lqs F2 April 25, 2019, 3:51 a.m. OK GNU C++11 TESTS 160 108 102400 2900
57710294 py_ultron F2 July 24, 2019, 11:14 p.m. OK GNU C++11 TESTS 160 171 819200 2900
53490621 Master_Yi F2 April 29, 2019, 8:23 a.m. OK GNU C++11 TESTS 160 171 819200 2900
57866289 lopare F2 July 27, 2019, 9:15 p.m. OK GNU C++11 TESTS 160 187 819200 2900
53490361 Fister F2 April 29, 2019, 8:10 a.m. OK GNU C++11 TESTS 160 312 1228800 2900
54873311 vjudge4 F2 May 31, 2019, 10:31 a.m. OK GNU C++11 TESTS 160 343 1024000 2900
54403638 Connected_failed F2 May 20, 2019, 3:55 a.m. OK GNU C++11 TESTS 160 343 1228800 2900
58682078 code_struck F2 Aug. 12, 2019, 7:32 p.m. OK GNU C++11 TESTS 160 358 409600 2900
53271509 dreamoon_love_AA F2 April 25, 2019, 6:39 a.m. OK GNU C++14 TESTS 160 31 16384000 2900
53314723 duxing201606 F2 April 26, 2019, 9:24 a.m. OK GNU C++14 TESTS 160 46 204800 2900
53314624 duxing201606 F2 April 26, 2019, 9:20 a.m. OK GNU C++14 TESTS 160 46 307200 2900
53314642 duxing201606 F2 April 26, 2019, 9:21 a.m. OK GNU C++14 TESTS 160 62 307200 2900
53265588 zsyzsy F2 April 25, 2019, 1:05 a.m. OK GNU C++14 TESTS 160 78 102400 2900
53247497 dreamoon_love_AA F2 April 24, 2019, 3:56 p.m. OK GNU C++14 TESTS 160 155 16281600 2900
53724885 Quang F2 May 4, 2019, 3:24 a.m. OK GNU C++14 TESTS 160 358 1024000 2900
56858137 Rezwan.Arefin01 F2 July 11, 2019, 7:47 p.m. OK GNU C++14 TESTS 160 529 921600 2900
53406099 kmjp F2 April 27, 2019, 10:51 a.m. OK GNU C++14 TESTS 160 826 2355200 2900
53724898 Quang F2 May 4, 2019, 3:25 a.m. OK GNU C++14 TESTS 160 1091 1024000 2900
68584409 user202729_ F2 Jan. 11, 2020, 10:53 a.m. OK GNU C++17 TESTS 160 31 0 2900
53282752 lqs2015 F2 April 25, 2019, 12:41 p.m. OK GNU C++17 TESTS 160 31 409600 2900
53271973 2014CAIS01 F2 April 25, 2019, 6:58 a.m. OK GNU C++17 TESTS 160 31 1638400 2900
53282916 lqs2015 F2 April 25, 2019, 12:44 p.m. OK GNU C++17 TESTS 160 46 409600 2900
55611103 ReaLNero1 F2 June 16, 2019, 5:46 a.m. OK GNU C++17 TESTS 160 46 1638400 2900
53288086 GuessYCB F2 April 25, 2019, 2:37 p.m. OK GNU C++17 TESTS 160 93 102400 2900
53260183 Akikaze F2 April 24, 2019, 6:53 p.m. OK GNU C++17 TESTS 160 156 16793600 2900
53426501 Kmcode F2 April 27, 2019, 1:53 p.m. OK GNU C++17 TESTS 160 171 2867200 2900
53426402 Kmcode F2 April 27, 2019, 1:50 p.m. OK GNU C++17 TESTS 160 187 2867200 2900
53426347 Kmcode F2 April 27, 2019, 1:49 p.m. OK GNU C++17 TESTS 160 327 2867200 2900
53966212 zhishou F2 May 10, 2019, 5:12 p.m. OK Java 8 TESTS 160 2511 0 2900
53966292 zhishou F2 May 10, 2019, 5:15 p.m. OK Java 8 TESTS 160 6988 0 2900

remove filters

Back to search problems