Codeforces Round 708 (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
1497 Codeforces Round 708 (Div. 2) FINISHED False 8100 121274663 March 17, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1569 ) D Genius PROGRAMMING bitmasks dp graphs 2500

B"Please note the non-standard memory limit. There are n problems numbered with integers from 1 to n . i -th problem has the complexity c_i = 2^i , tag tag_i and score s_i . After solving the problem i it's allowed to solve problem j if and only if text{IQ} < |c_i - c_j| and tag_i neq tag_j . After solving it your text{IQ} changes and becomes text{IQ} = |c_i - c_j| and you gain |s_i - s_j| points. Any problem can be the first. You can solve problems in any order and as many times as you want. Initially your text{IQ} = 0 . Find the maximum number of points that can be earned. The first line contains a single integer t (1 <= t <= 100) -- the number of test cases. The first line of each test case contains an integer n (1 <= n <= 5000) -- the number of problems. The second line of each test case contains n integers tag_1, tag_2, ldots, tag_n (1 <= tag_i <= n) -- tags of the problems. The third line of each test case contains n integers s_1, s_2, ldots, s_n (1 <= s_i <= 10^9) -- scores of the problems. It's guaranteed that sum of n over all test cases does not exceed 5000 . For each test case print a single integer -- the maximum number of points that can be earned. In the first test case optimal sequence of solving problems is as follows: In the second test case optimal sequence of solving problems is as follows: In the third test case optimal sequence of solving problems is as follows: "...

Tutorials

Codeforces Round #708 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
110275734 hangyesheng D March 18, 2021, 4:24 a.m. OK GNU C++11 TESTS 31 62 102400 2500
110267610 Shallow_Kevin D March 18, 2021, 12:55 a.m. OK GNU C++11 TESTS 31 62 102400 2500
110281774 suxxsfe D March 18, 2021, 5:55 a.m. OK GNU C++11 TESTS 31 78 0 2500
110273528 lunchbox D March 18, 2021, 3:38 a.m. OK GNU C++11 TESTS 31 78 102400 2500
110267081 lcyxds D March 18, 2021, 12:34 a.m. OK GNU C++11 TESTS 31 78 102400 2500
110278856 Dreamfarer D March 18, 2021, 5:15 a.m. OK GNU C++11 TESTS 31 93 102400 2500
110277718 hnust_guanxin D March 18, 2021, 4:58 a.m. OK GNU C++11 TESTS 31 93 102400 2500
110271223 lszxj D March 18, 2021, 2:49 a.m. OK GNU C++11 TESTS 31 93 102400 2500
110268312 Newbie_Rainbow_sjy D March 18, 2021, 1:22 a.m. OK GNU C++11 TESTS 31 93 102400 2500
110268228 rdfzXR D March 18, 2021, 1:19 a.m. OK GNU C++11 TESTS 31 93 102400 2500
110267261 nauuo D March 18, 2021, 12:41 a.m. OK GNU C++14 TESTS 31 62 102400 2500
110273712 farmerboy D March 18, 2021, 3:42 a.m. OK GNU C++14 TESTS 31 77 102400 2500
110248837 dlalswp25 D March 17, 2021, 6:01 p.m. OK GNU C++14 TESTS 31 77 102400 2500
110281039 dusra_mauka D March 18, 2021, 5:45 a.m. OK GNU C++14 TESTS 31 77 204800 2500
110248659 Devil D March 17, 2021, 6:01 p.m. OK GNU C++14 TESTS 31 77 204800 2500
110246824 askd D March 17, 2021, 4:47 p.m. OK GNU C++14 TESTS 31 78 102400 2500
110278713 dcac D March 18, 2021, 5:13 a.m. OK GNU C++14 TESTS 31 93 102400 2500
110278520 megumin007 D March 18, 2021, 5:11 a.m. OK GNU C++14 TESTS 31 93 102400 2500
110269002 lx_xl D March 18, 2021, 1:48 a.m. OK GNU C++14 TESTS 31 93 102400 2500
110267820 keroker0 D March 18, 2021, 1:02 a.m. OK GNU C++14 TESTS 31 93 102400 2500
110252780 realcomplex D March 17, 2021, 6:33 p.m. OK GNU C++17 TESTS 31 61 102400 2500
110277194 pulsatio D March 18, 2021, 4:50 a.m. OK GNU C++17 TESTS 31 61 5017600 2500
110278214 Peace56788 D March 18, 2021, 5:06 a.m. OK GNU C++17 TESTS 31 62 102400 2500
110276519 yugurt D March 18, 2021, 4:38 a.m. OK GNU C++17 TESTS 31 62 102400 2500
110262279 Martin53 D March 17, 2021, 9:19 p.m. OK GNU C++17 TESTS 31 62 102400 2500
110259889 Blondie D March 17, 2021, 8:20 p.m. OK GNU C++17 TESTS 31 62 307200 2500
110273261 Intercept D March 18, 2021, 3:33 a.m. OK GNU C++17 TESTS 31 77 102400 2500
110268960 Je-O D March 18, 2021, 1:47 a.m. OK GNU C++17 TESTS 31 77 102400 2500
110261547 fsjdogbsg D March 17, 2021, 8:57 p.m. OK GNU C++17 TESTS 31 77 102400 2500
110267582 SaoST D March 18, 2021, 12:54 a.m. OK GNU C++17 TESTS 31 77 204800 2500
110277969 jell D March 18, 2021, 5:02 a.m. OK GNU C++17 (64) TESTS 31 31 102400 2500
110261907 fivefourthreeone D March 17, 2021, 9:08 p.m. OK GNU C++17 (64) TESTS 31 31 102400 2500
110281816 vok8 D March 18, 2021, 5:55 a.m. OK GNU C++17 (64) TESTS 31 46 102400 2500
110280900 123ZDQ D March 18, 2021, 5:43 a.m. OK GNU C++17 (64) TESTS 31 46 102400 2500
110279549 huangxiaohua D March 18, 2021, 5:24 a.m. OK GNU C++17 (64) TESTS 31 46 102400 2500
110278282 rgnerdplayer D March 18, 2021, 5:07 a.m. OK GNU C++17 (64) TESTS 31 46 102400 2500
110278078 yjsp114514 D March 18, 2021, 5:04 a.m. OK GNU C++17 (64) TESTS 31 46 102400 2500
110273596 wjli D March 18, 2021, 3:40 a.m. OK GNU C++17 (64) TESTS 31 46 102400 2500
110273158 hoke_t D March 18, 2021, 3:30 a.m. OK GNU C++17 (64) TESTS 31 46 102400 2500
110272306 albertxwz D March 18, 2021, 3:12 a.m. OK GNU C++17 (64) TESTS 31 46 102400 2500
110251817 0x3F D March 17, 2021, 6:23 p.m. OK Go TESTS 31 374 102400 2500
110252166 0x3F D March 17, 2021, 6:26 p.m. OK Go TESTS 31 592 102400 2500
110251491 timmyfeng D March 17, 2021, 6:19 p.m. OK Kotlin TESTS 31 483 7680000 2500
110262807 Friska D March 17, 2021, 9:35 p.m. OK MS C++ 2017 TESTS 31 109 102400 2500
110279368 abhishen D March 18, 2021, 5:22 a.m. OK PyPy 3 TESTS 31 1418 10649600 2500
110262007 silvertint D March 17, 2021, 9:11 p.m. OK PyPy 3 TESTS 31 1419 10649600 2500
110249923 jimm89 D March 17, 2021, 6:07 p.m. OK PyPy 3 TESTS 31 1513 10956800 2500
110250162 toomer D March 17, 2021, 6:08 p.m. OK Rust TESTS 31 108 409600 2500

remove filters

Back to search problems