Codeforces Round 568 (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
1185 Codeforces Round 568 (Div. 2) FINISHED False 8100 176483687 June 19, 2019, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2911 ) G1 Playlist for Polycarp (easy version) PROGRAMMING bitmasks combinatorics dp 2100

B'The only difference between easy and hard versions is constraints. Polycarp loves to listen to music, so he never leaves the player, even on the way home from the university. Polycarp overcomes the distance from the university to the house in exactly T minutes. In the player, Polycarp stores n songs, each of which is characterized by two parameters: t_i and g_i , where t_i is the length of the song in minutes ( 1 <= t_i <= 15 ), g_i is its genre ( 1 <= g_i <= 3 ). Polycarp wants to create such a playlist so that he can listen to music all the time on the way from the university to his home, and at the time of his arrival home, the playlist is over. Polycarp never interrupts songs and always listens to them from beginning to end. Thus, if he started listening to the i -th song, he would spend exactly t_i minutes on its listening. Polycarp also does not like when two songs of the same genre play in a row (i.e. successively/adjacently) or when the songs in his playlist are repeated. Help Polycarpus count the number of different sequences of songs (their order matters), the total duration is exactly T , such that there are no two consecutive songs of the same genre in them and all the songs in the playlist are different. The first line of the input contains two integers n and T ( 1 <= n <= 15, 1 <= T <= 225 ) -- the number of songs in the player and the required total duration, respectively. Next, the n lines contain descriptions of songs: the i -th line contains two integers t_i and g_i ( 1 <= t_i <= 15, 1 <= g_i <= 3 ) -- the duration of the i -th song and its genre, respectively. Output one integer -- the number of different sequences of songs, the total length of exactly T , such that there are no two consecutive songs of the same genre in them and all the songs in the playlist are different. Since the answer may be huge, output it'...

Tutorials

Editorial for Codeforces Round #568 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55830829 KieranHorgan G1 June 20, 2019, 1:03 p.m. OK Clang++17 Diagnostics TESTS 109 717 9420800 2100
55851508 ruban G1 June 21, 2019, 4:08 a.m. OK Delphi TESTS 109 109 15769600 2100
55851502 ruban G1 June 21, 2019, 4:07 a.m. OK FPC TESTS 109 93 15769600 2100
56220193 ninety9 G1 June 28, 2019, 10:11 a.m. OK GNU C11 TESTS 109 31 409600 2100
56422727 TreskaPLUSe G1 July 2, 2019, 8:08 a.m. OK GNU C++11 TESTS 109 31 0 2100
56184379 SyrSam G1 June 28, 2019, 3:21 a.m. OK GNU C++11 TESTS 109 31 102400 2100
55808647 Road_to_Candidate-master G1 June 20, 2019, 1:43 a.m. OK GNU C++11 TESTS 109 31 102400 2100
60450682 DigBick G1 Sept. 12, 2019, 3:49 p.m. OK GNU C++11 TESTS 109 31 102400 2100
56162283 Cothrax G1 June 27, 2019, 12:50 p.m. OK GNU C++11 TESTS 109 31 204800 2100
55822566 daniel14311531 G1 June 20, 2019, 9:16 a.m. OK GNU C++11 TESTS 109 31 204800 2100
56558343 carcar G1 July 5, 2019, 1:31 p.m. OK GNU C++11 TESTS 109 31 204800 2100
55810178 racoon G1 June 20, 2019, 3:08 a.m. OK GNU C++11 TESTS 109 31 307200 2100
56465566 chenyewei_1234 G1 July 3, 2019, 8:46 a.m. OK GNU C++11 TESTS 109 31 307200 2100
58410009 gote G1 Aug. 7, 2019, 12:59 a.m. OK GNU C++11 TESTS 109 31 409600 2100
59665749 shifanyiakioi G1 Aug. 29, 2019, 2:08 p.m. OK GNU C++14 TESTS 109 30 28262400 2100
62112239 animeFORever G1 Oct. 8, 2019, 12:29 p.m. OK GNU C++14 TESTS 109 31 102400 2100
56365609 30something G1 June 30, 2019, 10:17 p.m. OK GNU C++14 TESTS 109 31 102400 2100
56267376 KyRillos_BoshRa G1 June 29, 2019, 10:29 a.m. OK GNU C++14 TESTS 109 31 102400 2100
56000640 notanymore G1 June 24, 2019, 12:51 p.m. OK GNU C++14 TESTS 109 31 102400 2100
55981234 S.Jindal G1 June 23, 2019, 9:17 p.m. OK GNU C++14 TESTS 109 31 102400 2100
55948430 seo G1 June 22, 2019, 9:59 p.m. OK GNU C++14 TESTS 109 31 102400 2100
55855310 priyesh_coder G1 June 21, 2019, 6:41 a.m. OK GNU C++14 TESTS 109 31 102400 2100
55842399 ahshafi G1 June 20, 2019, 6:49 p.m. OK GNU C++14 TESTS 109 31 102400 2100
56452094 Lezedary_sandwich G1 July 2, 2019, 11:58 p.m. OK GNU C++14 TESTS 109 31 102400 2100
58225690 WaluntOvO G1 Aug. 3, 2019, 2:22 p.m. OK GNU C++17 TESTS 109 30 716800 2100
58414425 GARNiDELiA G1 Aug. 7, 2019, 3:49 a.m. OK GNU C++17 TESTS 109 30 1024000 2100
55855197 FoolishMe G1 June 21, 2019, 6:38 a.m. OK GNU C++17 TESTS 109 30 68505600 2100
58960449 Felerius G1 Aug. 17, 2019, 2:58 p.m. OK GNU C++17 TESTS 109 31 0 2100
62119151 zzyhuajuan G1 Oct. 8, 2019, 2:11 p.m. OK GNU C++17 TESTS 109 31 0 2100
57176928 hyf1997 G1 July 17, 2019, 5:55 a.m. OK GNU C++17 TESTS 109 31 102400 2100
56994110 wladw G1 July 13, 2019, 8:26 p.m. OK GNU C++17 TESTS 109 31 102400 2100
56389119 akagami_no_shanks G1 July 1, 2019, 11:49 a.m. OK GNU C++17 TESTS 109 31 102400 2100
56427081 ummmmm_ G1 July 2, 2019, 10:09 a.m. OK GNU C++17 TESTS 109 31 102400 2100
59531794 GuaGuaGuaGuaGua G1 Aug. 26, 2019, 3:19 p.m. OK GNU C++17 TESTS 109 31 102400 2100
55934016 Nipun_iiitd G1 June 22, 2019, 12:59 p.m. OK Java 8 TESTS 109 109 0 2100
58996649 Jarik G1 Aug. 18, 2019, 11:42 a.m. OK Java 8 TESTS 109 124 0 2100
58630863 ISSAM_LAKOUAM G1 Aug. 11, 2019, 7:44 p.m. OK Java 8 TESTS 109 124 0 2100
56764306 TheSawan G1 July 9, 2019, 5:26 p.m. OK Java 8 TESTS 109 124 0 2100
56450241 spar5h G1 July 2, 2019, 9:33 p.m. OK Java 8 TESTS 109 124 0 2100
55980218 saptarshim G1 June 23, 2019, 8:18 p.m. OK Java 8 TESTS 109 124 0 2100
55847405 guillermo_sz G1 June 20, 2019, 11:15 p.m. OK Java 8 TESTS 109 124 0 2100
55832223 Happy_Stove G1 June 20, 2019, 1:41 p.m. OK Java 8 TESTS 109 124 0 2100
55831937 Happy_Stove G1 June 20, 2019, 1:34 p.m. OK Java 8 TESTS 109 124 0 2100
68908319 pulkit14 G1 Jan. 16, 2020, 7:11 a.m. OK Java 8 TESTS 109 140 0 2100
62379516 vjudge5 G1 Oct. 11, 2019, 6:34 p.m. OK Mono C# TESTS 109 62 921600 2100
62380934 riantkb G1 Oct. 11, 2019, 7:07 p.m. OK Mono C# TESTS 109 62 1024000 2100
56501290 S.K G1 July 4, 2019, 6:27 a.m. OK MS C++ TESTS 109 31 7782400 2100
56775504 vjudge4 G1 July 10, 2019, 2:22 a.m. OK MS C++ TESTS 109 46 4198400 2100
56755857 vjudge4 G1 July 9, 2019, 1:52 p.m. OK MS C++ TESTS 109 46 4198400 2100
59683625 webeseit G1 Aug. 29, 2019, 10:52 p.m. OK MS C++ 2017 TESTS 109 31 102400 2100
60665099 pichulia G1 Sept. 16, 2019, 7:34 a.m. OK MS C++ 2017 TESTS 109 46 102400 2100
55859855 Skeef79 G1 June 21, 2019, 8:59 a.m. OK MS C++ 2017 TESTS 109 46 1024000 2100
56754667 xsc G1 July 9, 2019, 1:22 p.m. OK MS C++ 2017 TESTS 109 46 1024000 2100
55809237 Timonnable G1 June 20, 2019, 2:18 a.m. OK MS C++ 2017 TESTS 109 889 90726400 2100
55871327 bcollet G1 June 21, 2019, 2:50 p.m. OK PyPy 2 TESTS 109 217 5939200 2100
58252492 yumtam G1 Aug. 4, 2019, 8:30 a.m. OK PyPy 2 TESTS 109 218 5222400 2100
56024262 pineriver G1 June 25, 2019, 6:06 a.m. OK PyPy 3 TESTS 109 249 4710400 2100
56041547 ThePonyCoder G1 June 25, 2019, 2:33 p.m. OK PyPy 3 TESTS 109 311 5632000 2100
56004049 Kiri8128 G1 June 24, 2019, 2:31 p.m. OK PyPy 3 TESTS 109 373 16998400 2100
57551945 Helli.code G1 July 22, 2019, 5:51 p.m. OK Python 2 TESTS 109 1622 1433600 2100
58206204 coder_better G1 Aug. 3, 2019, 7:03 a.m. OK Python 3 TESTS 109 1263 1331200 2100
56436672 hansinahuja a8ul adarsh_kumar9 G1 July 2, 2019, 2:28 p.m. OK Python 3 TESTS 109 2495 1331200 2100
56436603 EkanshMahendru G1 July 2, 2019, 2:26 p.m. OK Python 3 TESTS 109 2495 1331200 2100
55820728 tuna_salad G1 June 20, 2019, 8:26 a.m. OK Rust TESTS 109 31 716800 2100
66320531 sansen G1 Dec. 5, 2019, 1:51 p.m. OK Rust TESTS 109 46 102400 2100
55870663 tuna_salad G1 June 21, 2019, 2:29 p.m. OK Rust TESTS 109 46 102400 2100
55840316 yakamoto G1 June 20, 2019, 5:38 p.m. OK Scala TESTS 109 467 0 2100

remove filters

Back to search problems