Codeforces Round 870 (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
1826 Codeforces Round 870 (Div. 2) FINISHED False 7200 53969063 May 5, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1681 ) E Walk the Runway PROGRAMMING bitmasks brute force data structures dp graphs implementation sortings 2400

B'A fashion tour consists of m identical runway shows in different cities. There are n models willing to participate in the tour, numbered from 1 to n . People in different cities have different views on the fashion industry, so they rate each model differently. In particular, people in city i rate model j with rating r_{i, j} . You are to choose some number of k models, and their order, let the chosen models have indices j_1, j_2, ... , j_k in the chosen order. In each city, these k models will walk the runway one after another in this order. To make the show exciting, in each city, the ratings of models should be strictly increasing in the order of their performance. More formally, for any city i and index t ( 2 <= q t <= q k ), the ratings must satisfy r_{i,j_{t - 1}} < r_{i,j_t} . After all, the fashion industry is all about money, so choosing model j to participate in the tour profits you p_j money. Compute the maximum total profit you can make by choosing the models and their order while satisfying all the requirements. The first line contains two integers m and n ( 1 <= q m <= q 500 , 1 <= q n <= q 5000 ) -- the number of shows and the number of models willing to participate respectively. The second line contains n integers p_j ( 1 <= q p_j <= q 10^9 ) -- the profit you get inviting the j -th model to the tour. The next m lines each contain n integers. Line number i contains n integers r_{i, j} ( 1 <= q r_{i, j} <= q n ) -- the ratings of models in city i . Output a single integer -- the largest total amount of money you can get. In the first example, there are 3 invited models. The show consists of models in the order [1, 3, 4] . Then, the corresponding ratings in the cities are as follows: You can see that the ratings are increasing. So the total profit is 10 '...

Tutorials

Codeforces Round #870 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
205430060 c1120231020 E May 11, 2023, 12:42 p.m. OK GNU C++14 TESTS 57 982 206540800 2400
205840760 arthur.nascimento E May 14, 2023, 2:10 p.m. OK GNU C++14 TESTS 57 1013 83353600 2400
205278206 suckmyballs E May 10, 2023, 12:52 a.m. OK GNU C++14 TESTS 57 1138 3276800 2400
205225518 chensunlai E May 9, 2023, 12:46 p.m. OK GNU C++14 TESTS 57 1138 13516800 2400
205607925 2000030309_geethika E May 12, 2023, 4:11 p.m. OK GNU C++14 TESTS 57 1138 13721600 2400
204917704 _Fake4Fun E May 7, 2023, 4:12 a.m. OK GNU C++14 TESTS 57 1153 78745600 2400
206398743 PurpleWhale E May 19, 2023, 3:07 a.m. OK GNU C++14 TESTS 57 1184 88780800 2400
205405533 Cu_OH_2 E May 11, 2023, 8:40 a.m. OK GNU C++14 TESTS 57 1184 99020800 2400
205173228 hkr04 E May 9, 2023, 12:39 a.m. OK GNU C++14 TESTS 57 1200 13312000 2400
205055041 JKL891402 E May 8, 2023, 7:47 a.m. OK GNU C++14 TESTS 57 1200 13721600 2400
205097526 islingr E May 8, 2023, 12:43 p.m. OK GNU C++17 TESTS 57 779 23961600 2400
205273228 franchu E May 9, 2023, 9:53 p.m. OK GNU C++17 TESTS 57 919 36659200 2400
205386022 Knowledge_LLZ E May 11, 2023, 3:55 a.m. OK GNU C++17 TESTS 57 966 78848000 2400
205337340 Weiqt E May 10, 2023, 2:09 p.m. OK GNU C++17 TESTS 57 982 13414400 2400
205073568 2000031325 E May 8, 2023, 11:22 a.m. OK GNU C++17 TESTS 57 1014 23552000 2400
205051679 nordanov E May 8, 2023, 7:05 a.m. OK GNU C++17 TESTS 57 1014 23552000 2400
206448940 Pavlot E May 19, 2023, 1:02 p.m. OK GNU C++17 TESTS 57 1028 13516800 2400
205782945 OIerkzc_love_10circle E May 14, 2023, 4:37 a.m. OK GNU C++17 TESTS 57 1045 3276800 2400
205340088 Weiqt E May 10, 2023, 2:33 p.m. OK GNU C++17 TESTS 57 1060 13414400 2400
206451933 crFlowerz E May 19, 2023, 1:33 p.m. OK GNU C++17 TESTS 57 1075 13721600 2400
205386893 chakravarthi_1 E May 11, 2023, 4:15 a.m. OK GNU C++17 (64) TESTS 57 732 23449600 2400
206138181 opPO E May 16, 2023, 5:17 p.m. OK GNU C++17 (64) TESTS 57 764 23449600 2400
205391638 Alex_Wei E May 11, 2023, 5:42 a.m. OK GNU C++17 (64) TESTS 57 795 3584000 2400
205382052 Alex_Wei E May 11, 2023, 2:22 a.m. OK GNU C++17 (64) TESTS 57 888 3584000 2400
206435200 ZzMK E May 19, 2023, 10:42 a.m. OK GNU C++17 (64) TESTS 57 904 13516800 2400
204984057 rapira E May 7, 2023, 2:16 p.m. OK GNU C++17 (64) TESTS 57 904 23552000 2400
205056653 iamttm E May 8, 2023, 8:08 a.m. OK GNU C++17 (64) TESTS 57 919 3276800 2400
204917277 keeping_running E May 7, 2023, 4:04 a.m. OK GNU C++17 (64) TESTS 57 920 204902400 2400
206357081 1250713087 E May 18, 2023, 3:12 p.m. OK GNU C++17 (64) TESTS 57 998 3481600 2400
205067833 Kinuru E May 8, 2023, 10:17 a.m. OK GNU C++17 (64) TESTS 57 998 13312000 2400
206455969 Numinous E May 19, 2023, 2:14 p.m. OK GNU C++20 (64) TESTS 57 561 13721600 2400
205233245 piyush_pransukhka E May 9, 2023, 1:52 p.m. OK GNU C++20 (64) TESTS 57 608 48128000 2400
205233137 piyush_pransukhka E May 9, 2023, 1:51 p.m. OK GNU C++20 (64) TESTS 57 623 48128000 2400
205231552 piyush_pransukhka E May 9, 2023, 1:38 p.m. OK GNU C++20 (64) TESTS 57 623 58675200 2400
205230146 skimono E May 9, 2023, 1:26 p.m. OK GNU C++20 (64) TESTS 57 624 3276800 2400
205252252 S2speed E May 9, 2023, 4:42 p.m. OK GNU C++20 (64) TESTS 57 670 3788800 2400
205811713 fengzhengwei E May 14, 2023, 9:15 a.m. OK GNU C++20 (64) TESTS 57 686 34406400 2400
205275820 Ayalla E May 9, 2023, 11:15 p.m. OK GNU C++20 (64) TESTS 57 701 153497600 2400
206146002 EgorKush E May 16, 2023, 6:33 p.m. OK GNU C++20 (64) TESTS 57 702 3379200 2400
204971015 Nxxlt E May 7, 2023, 12:21 p.m. OK GNU C++20 (64) TESTS 57 702 44236800 2400
205038521 ch2001 E May 8, 2023, 3:15 a.m. OK Java 11 TESTS 57 1637 18124800 2400
205170714 golions E May 8, 2023, 11:11 p.m. OK Java 8 TESTS 57 1949 61747200 2400
205531407 andrey.m E May 12, 2023, 11:54 a.m. OK Rust 2021 TESTS 57 670 3993600 2400
205348128 kost E May 10, 2023, 3:55 p.m. OK Rust 2021 TESTS 57 920 7270400 2400

remove filters

Back to search problems