Educational Codeforces Round 85 (Rated for 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
1334 Educational Codeforces Round 85 (Rated for Div. 2) FINISHED False 7200 150823511 April 10, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1350 ) F Strange Function PROGRAMMING data structures dp

B"Let's denote the following function f . This function takes an array a of length n and returns an array. Initially the result is an empty array. For each integer i from 1 to n we add element a_i to the end of the resulting array if it is greater than all previous elements (more formally, if a_i > max limits_{1 <= j < i}a_j ). Some examples of the function f : You are given two arrays: array a_1, a_2, ... , a_n and array b_1, b_2, ... , b_m . You can delete some elements of array a (possibly zero). To delete the element a_i , you have to pay p_i coins (the value of p_i can be negative, then you get |p_i| coins, if you delete this element). Calculate the minimum number of coins (possibly negative) you have to spend for fulfilling equality f(a) = b . The first line contains one integer n (1 <= n <= 5 cdot 10^5) -- the length of array a . The second line contains n integers a_1, a_2, ... , a_n (1 <= a_i <= n) -- the array a . The third line contains n integers p_1, p_2, ... , p_n (|p_i| <= 10^9) -- the array p . The fourth line contains one integer m (1 <= m <= n) -- the length of array b . The fifth line contains m integers b_1, b_2, ... , b_m (1 <= b_i <= n, b_{i-1} < b_i) -- the array b . If the answer exists, in the first line print YES. In the second line, print the minimum number of coins you have to spend for fulfilling equality f(a) = b . Otherwise in only line print NO. "...

Tutorials

Educational Codeforces Round 85 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
76285196 liqing F April 12, 2020, 4:39 a.m. OK GNU C++11 TESTS 31 78 18841600
76286978 Fuyuki F April 12, 2020, 5:09 a.m. OK GNU C++11 TESTS 31 78 20172800
76309613 Frame233 F April 12, 2020, 9:17 a.m. OK GNU C++11 TESTS 32 78 28057600
76173651 Fuyuky F April 10, 2020, 4:09 p.m. OK GNU C++11 TESTS 31 93 20377600
76444691 wasa855 F April 13, 2020, 3:20 a.m. OK GNU C++11 TESTS 32 124 32051200
76222001 Pengzhike F April 11, 2020, 12:26 a.m. OK GNU C++11 TESTS 31 171 20070400
76229246 Alex_Wei F April 11, 2020, 3:51 a.m. OK GNU C++11 TESTS 31 202 60620800
76219935 ACMonster F April 10, 2020, 11:17 p.m. OK GNU C++11 TESTS 31 218 30617600
76181365 msuwakow F April 10, 2020, 4:24 p.m. OK GNU C++11 TESTS 31 218 32563200
76233775 Alex_Wei F April 11, 2020, 5:17 a.m. OK GNU C++11 TESTS 31 218 44646400
76185687 arnold518 F April 10, 2020, 4:32 p.m. OK GNU C++14 TESTS 31 389 24064000
76415709 Sisyy F April 12, 2020, 6:02 p.m. OK GNU C++14 TESTS 32 404 28262400
76255213 raghav_19 F April 11, 2020, 6:15 p.m. OK GNU C++14 TESTS 31 405 10035200
76313162 xacotasamata F April 12, 2020, 9:54 a.m. OK GNU C++14 TESTS 32 405 16076800
76213912 m4_wal3a F April 10, 2020, 8:49 p.m. OK GNU C++14 TESTS 31 405 24064000
76299143 BJoozz F April 12, 2020, 7:24 a.m. OK GNU C++14 TESTS 32 405 36044800
76318608 hoangtung_pbc F April 12, 2020, 11 a.m. OK GNU C++14 TESTS 32 420 36044800
76328454 a2dalek F April 12, 2020, 1:11 p.m. OK GNU C++14 TESTS 32 420 38297600
76197394 shivamagarwal42157 F April 10, 2020, 5:36 p.m. OK GNU C++14 TESTS 31 421 12800000
76214923 zoooma13 F April 10, 2020, 9:09 p.m. OK GNU C++14 TESTS 31 421 18022400
76395088 ftiasch F April 12, 2020, 3:46 p.m. OK GNU C++17 TESTS 32 62 12083200
76409393 ftiasch F April 12, 2020, 5:11 p.m. OK GNU C++17 TESTS 32 77 10137600
76271459 okwedook F April 11, 2020, 10:46 p.m. OK GNU C++17 TESTS 31 93 30105600
76245261 nickluo F April 11, 2020, 8:02 a.m. OK GNU C++17 TESTS 31 234 40857600
76177316 natsugiri F April 10, 2020, 4:17 p.m. OK GNU C++17 TESTS 31 327 10035200
76173195 SHZhang2 F April 10, 2020, 4:09 p.m. OK GNU C++17 TESTS 31 373 12083200
76389605 ftiasch F April 12, 2020, 3:33 p.m. OK GNU C++17 TESTS 32 374 10035200
76272574 AlexanderL F April 11, 2020, 11:17 p.m. OK GNU C++17 TESTS 31 389 16076800
76175562 gyz_gyz F April 10, 2020, 4:13 p.m. OK GNU C++17 TESTS 31 389 24064000
76272882 edsa F April 11, 2020, 11:26 p.m. OK GNU C++17 TESTS 31 389 44134400
76277789 BlahDuckling747 F April 12, 2020, 1:59 a.m. OK GNU C++17 (64) TESTS 31 233 22016000
76193836 fdironia F April 10, 2020, 5:09 p.m. OK GNU C++17 (64) TESTS 31 249 26009600
76255238 860579 F April 11, 2020, 6:15 p.m. OK GNU C++17 (64) TESTS 31 264 12800000
76263545 Phortox F April 11, 2020, 8:11 p.m. OK GNU C++17 (64) TESTS 31 264 36044800
76190642 fdironia F April 10, 2020, 4:50 p.m. OK GNU C++17 (64) TESTS 31 280 26009600
76176716 Tuxianeer F April 10, 2020, 4:15 p.m. OK GNU C++17 (64) TESTS 31 296 12800000
76273877 dubey233310 F April 11, 2020, 11:57 p.m. OK GNU C++17 (64) TESTS 31 296 41267200
76266890 Rubikun F April 11, 2020, 9:06 p.m. OK GNU C++17 (64) TESTS 31 311 41267200
76173669 tute7627 F April 10, 2020, 4:09 p.m. OK GNU C++17 (64) TESTS 31 312 16076800
76267746 tyler F April 11, 2020, 9:23 p.m. OK GNU C++17 (64) TESTS 31 327 36147200
76328579 derrick20 F April 12, 2020, 1:12 p.m. OK Java 8 TESTS 32 233 28774400
76302696 cwise F April 12, 2020, 8:02 a.m. OK Java 8 TESTS 32 794 82022400
76189354 SecondThread F April 10, 2020, 4:44 p.m. OK Java 8 TESTS 31 857 130457600
76228586 QAQmika F April 11, 2020, 3:36 a.m. OK MS C++ 2017 TESTS 31 623 86323200
76214719 4eT_llpuyHblJl F April 10, 2020, 9:05 p.m. OK MS C++ 2017 TESTS 31 1092 14028800
76265311 sansen F April 11, 2020, 8:39 p.m. OK Rust TESTS 31 654 35225600

remove filters

Back to search problems