Codeforces Round 863 (Div. 3)

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
1811 Codeforces Round 863 (Div. 3) FINISHED False 8100 64077873 April 4, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2221 ) G1 Vlad and the Nice Paths (easy version) PROGRAMMING combinatorics dp math

B"This is an easy version of the problem, it differs from the hard one only by constraints on n and k . Vlad found a row of n tiles and the integer k . The tiles are indexed from left to right and the i -th tile has the color c_i . After a little thought, he decided what to do with it. You can start from any tile and jump to any number of tiles right, forming the path p . Let's call the path p of length m nice if: Your task is to find the number of nice paths of maximum length. Since this number may be too large, print it modulo 10^9 + 7 . The first line of each test contains the integer t ( 1 <= t <= 10^4 ) -- the number of test cases in the test. The first line of each test case contains two integers n and k ( 1 <= k <= n <= 100 ) -- the number of tiles in a row and the length of the block. The second line of each test case contains n integers c_1, c_2, c_3, ... , c_n ( 1 <= c_i <= n ) -- tile colors. It is guaranteed that the sum of n^3 over all test cases does not exceed 5 cdot 10^6 . Print t numbers, each of which is the answer to the corresponding test case -- the number of nice paths of maximum length modulo 10^9 + 7 . In the first sample, it is impossible to make a nice path with a length greater than 0 . In the second sample, we are interested in the following paths: In the third example, any path of length 8 is nice. "...

Tutorials

114788

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
200835234 Tom66 G1 April 5, 2023, 5:59 a.m. OK GNU C++14 TESTS 25 15 921600
200834845 Tom66 G1 April 5, 2023, 5:54 a.m. OK GNU C++14 TESTS 25 15 921600
200813632 Taha G1 April 4, 2023, 10:58 p.m. OK GNU C++14 TESTS 25 30 74649600
200819342 ringup G1 April 5, 2023, 1:28 a.m. OK GNU C++14 TESTS 25 30 226406400
200783235 lh3k G1 April 4, 2023, 4:59 p.m. OK GNU C++14 TESTS 24 31 102400
200824703 _callmelucian G1 April 5, 2023, 3:16 a.m. OK GNU C++14 TESTS 25 31 8396800
200781730 Nathan.Li G1 April 4, 2023, 4:52 p.m. OK GNU C++14 TESTS 24 31 100352000
200822437 Anonyme G1 April 5, 2023, 2:34 a.m. OK GNU C++14 TESTS 25 31 113254400
200827847 ZifanWang G1 April 5, 2023, 4:11 a.m. OK GNU C++14 TESTS 25 31 125440000
200822337 danxiangfa G1 April 5, 2023, 2:32 a.m. OK GNU C++14 TESTS 25 46 102400
200782531 BlackPanther112358 G1 April 4, 2023, 4:55 p.m. OK GNU C++17 TESTS 24 30 716800
200782927 Contna G1 April 4, 2023, 4:57 p.m. OK GNU C++17 TESTS 24 31 102400
200799304 komite G1 April 4, 2023, 7:10 p.m. OK GNU C++17 TESTS 25 31 204800
200794581 samir4ik G1 April 4, 2023, 6:39 p.m. OK GNU C++17 TESTS 25 31 204800
200791064 hathuhaha G1 April 4, 2023, 6:02 p.m. OK GNU C++17 TESTS 24 31 204800
200784958 orangecalculator G1 April 4, 2023, 5:09 p.m. OK GNU C++17 TESTS 24 31 204800
200832463 pipipipipi43 G1 April 5, 2023, 5:23 a.m. OK GNU C++17 TESTS 25 31 307200
200781992 SyberCage G1 April 4, 2023, 4:53 p.m. OK GNU C++17 TESTS 24 31 409600
200784079 deVICe7772 G1 April 4, 2023, 5:04 p.m. OK GNU C++17 TESTS 24 31 100454400
200782449 Yzm007 G1 April 4, 2023, 4:55 p.m. OK GNU C++17 TESTS 24 31 100659200
200804970 MarcosK G1 April 4, 2023, 8:23 p.m. OK GNU C++17 (64) TESTS 25 15 102400
200788427 HCPS42 G1 April 4, 2023, 5:37 p.m. OK GNU C++17 (64) TESTS 24 15 102400
200783920 yeche2023 G1 April 4, 2023, 5:03 p.m. OK GNU C++17 (64) TESTS 24 15 1126400
200812123 nocap G1 April 4, 2023, 10:21 p.m. OK GNU C++17 (64) TESTS 25 30 102400
200810529 birka0 G1 April 4, 2023, 9:46 p.m. OK GNU C++17 (64) TESTS 25 31 102400
200810360 ljuba G1 April 4, 2023, 9:43 p.m. OK GNU C++17 (64) TESTS 25 31 102400
200834985 Cantor. G1 April 5, 2023, 5:56 a.m. OK GNU C++17 (64) TESTS 25 31 204800
200816718 kevinyang G1 April 5, 2023, 12:21 a.m. OK GNU C++17 (64) TESTS 25 31 204800
200829593 Once_I_Liked_AGirl G1 April 5, 2023, 4:42 a.m. OK GNU C++17 (64) TESTS 25 31 307200
200784793 korokseeds G1 April 4, 2023, 5:08 p.m. OK GNU C++17 (64) TESTS 24 31 307200
200835471 Uriel G1 April 5, 2023, 6:02 a.m. OK GNU C++20 (64) TESTS 25 15 0
200826130 Master2010 G1 April 5, 2023, 3:42 a.m. OK GNU C++20 (64) TESTS 25 15 0
200787714 j_2_k G1 April 4, 2023, 5:31 p.m. OK GNU C++20 (64) TESTS 24 15 0
200786069 jiangly G1 April 4, 2023, 5:17 p.m. OK GNU C++20 (64) TESTS 24 15 0
200783151 pavankalyanpallapolu G1 April 4, 2023, 4:58 p.m. OK GNU C++20 (64) TESTS 24 15 0
200826343 EDCTY G1 April 5, 2023, 3:46 a.m. OK GNU C++20 (64) TESTS 25 15 102400
200825369 dqjm G1 April 5, 2023, 3:27 a.m. OK GNU C++20 (64) TESTS 25 15 102400
200798561 vishveswarch710 G1 April 4, 2023, 7:02 p.m. OK GNU C++20 (64) TESTS 25 15 102400
200791276 panyan7 G1 April 4, 2023, 6:04 p.m. OK GNU C++20 (64) TESTS 24 15 102400
200789973 Gesgha G1 April 4, 2023, 5:52 p.m. OK GNU C++20 (64) TESTS 24 15 102400
200791427 dzhi G1 April 4, 2023, 6:06 p.m. OK Java 11 TESTS 24 249 0
200798683 TCchen G1 April 4, 2023, 7:03 p.m. OK Java 17 TESTS 25 233 512000
200794093 Aaryendra G1 April 4, 2023, 6:34 p.m. OK Java 17 TESTS 25 280 512000
200817148 Eslam_Ahmed G1 April 5, 2023, 12:33 a.m. OK Java 17 TESTS 25 296 28364800
200825078 IanISam G1 April 5, 2023, 3:22 a.m. OK Java 8 TESTS 25 124 0
200824213 hxu10 G1 April 5, 2023, 3:07 a.m. OK PyPy 3-64 TESTS 25 155 9932800
200818067 mkawa2 G1 April 5, 2023, 12:56 a.m. OK PyPy 3-64 TESTS 25 171 9523200
200785874 FlakeLCR G1 April 4, 2023, 5:15 p.m. OK PyPy 3-64 TESTS 24 202 9728000
200788466 FlakeLCR G1 April 4, 2023, 5:37 p.m. OK PyPy 3-64 TESTS 24 233 10444800
200821096 ZrjaK G1 April 5, 2023, 2:07 a.m. OK PyPy 3-64 TESTS 25 264 11161600
200789774 1_2_3_4_5_9 G1 April 4, 2023, 5:49 p.m. OK PyPy 3-64 TESTS 24 264 17408000
200793272 sushmanth.dampur8780 G1 April 4, 2023, 6:25 p.m. OK PyPy 3-64 TESTS 25 265 9932800
200832832 Ye_Che G1 April 5, 2023, 5:28 a.m. OK PyPy 3-64 TESTS 25 452 10752000
200788247 shade34 G1 April 4, 2023, 5:35 p.m. OK PyPy 3-64 TESTS 24 467 10854400

remove filters

Back to search problems