Educational Codeforces Round 42 (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
962 Educational Codeforces Round 42 (Rated for Div. 2) FINISHED False 7200 208452299 April 10, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1089 ) E Byteland, Berland and Disputed Cities PROGRAMMING constructive algorithms greedy 2200

B"The cities of Byteland and Berland are located on the axis Ox . In addition, on this axis there are also disputed cities, which belong to each of the countries in their opinion. Thus, on the line Ox there are three types of cities: Recently, the project BNET has been launched -- a computer network of a new generation. Now the task of the both countries is to connect the cities so that the network of this country is connected. The countries agreed to connect the pairs of cities with BNET cables in such a way that: Thus, it is necessary to choose a set of pairs of cities to connect by cables in such a way that both conditions are satisfied simultaneously. Cables allow bi-directional data transfer. Each cable connects exactly two distinct cities. The cost of laying a cable from one city to another is equal to the distance between them. Find the minimum total cost of laying a set of cables so that two subsets of cities (Byteland and disputed cities, Berland and disputed cities) are connected. Each city is a point on the line Ox . It is technically possible to connect the cities a and b with a cable so that the city c ( a < c < b ) is not connected to this cable, where a , b and c are simultaneously coordinates of the cities a , b and c . The first line contains a single integer n ( 2 <= n <= 2 cdot 10^{5} ) -- the number of cities. The following n lines contains an integer x_i and the letter c_i ( -10^{9} <= x_i <= 10^{9} ) -- the coordinate of the city and its type. If the city belongs to Byteland, c_i equals to 'B'. If the city belongs to Berland, c_i equals to xc2 xabR xc2 xbb. If the city is disputed, c_i equals to 'P'. All cities have distinct coordinates. Guaranteed, that the cities are given in the increasing order of their coordinates. Print the minimal total length of such set of cables, that if we delete all Berland cities ( c_i "...

Tutorials

Educational Codeforces Round 42 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
37457279 Scut82 E April 19, 2018, 9:55 a.m. OK GNU C++ TESTS 45 62 5632000 2200
37457232 Scut82 E April 19, 2018, 9:52 a.m. OK GNU C++ TESTS 45 62 6656000 2200
37221138 Als123 E April 11, 2018, 11:35 a.m. OK GNU C++ TESTS 45 77 6758400 2200
40368503 -Invoid E July 15, 2018, 7:04 a.m. OK GNU C++ TESTS 45 78 0 2200
37372322 s97383114 E April 16, 2018, 12:35 p.m. OK GNU C++ TESTS 45 78 3276800 2200
37595218 zz160 E April 25, 2018, 11:37 a.m. OK GNU C++ TESTS 45 78 3481600 2200
37644885 vjudge4 E April 26, 2018, 6:24 p.m. OK GNU C++ TESTS 45 78 3481600 2200
38938940 ToErr E June 4, 2018, 8:40 a.m. OK GNU C++ TESTS 45 78 5324800 2200
37225777 htcheck E April 11, 2018, 1:55 p.m. OK GNU C++ TESTS 45 78 6656000 2200
37454093 vjudge5 E April 19, 2018, 6:59 a.m. OK GNU C++ TESTS 45 93 3379200 2200
51879887 rainboy E March 26, 2019, 10:45 p.m. OK GNU C11 TESTS 45 78 2662400 2200
37214296 emoairx E April 11, 2018, 10:45 a.m. OK GNU C++11 TESTS 45 31 5632000 2200
37214398 emoairx E April 11, 2018, 10:49 a.m. OK GNU C++11 TESTS 45 31 5632000 2200
37214412 yasugongshang E April 11, 2018, 10:49 a.m. OK GNU C++11 TESTS 45 31 6553600 2200
66790480 He_Ren E Dec. 13, 2019, 3:05 p.m. OK GNU C++11 TESTS 45 46 0 2200
43454000 Umi E Sept. 26, 2018, 2:15 p.m. OK GNU C++11 TESTS 45 46 2150400 2200
37365300 GuYueNa E April 16, 2018, 5:13 a.m. OK GNU C++11 TESTS 45 46 5836800 2200
37427320 MiracleEEEE E April 18, 2018, 7:21 a.m. OK GNU C++11 TESTS 45 46 5939200 2200
37214246 emoairx E April 11, 2018, 10:43 a.m. OK GNU C++11 TESTS 45 46 7270400 2200
55539283 spiderbatman E June 13, 2019, 6:33 p.m. OK GNU C++11 TESTS 45 62 1638400 2200
37183966 axs7384 E April 11, 2018, 1:25 a.m. OK GNU C++11 TESTS 45 77 3788800 2200
40932396 ReaLNero1 E July 30, 2018, 1:46 a.m. OK GNU C++14 TESTS 45 31 1638400 2200
37185100 cghAndy E April 11, 2018, 2:57 a.m. OK GNU C++14 TESTS 45 31 5222400 2200
37184712 cghAndy E April 11, 2018, 2:26 a.m. OK GNU C++14 TESTS 45 46 5222400 2200
37226867 WesternBoy E April 11, 2018, 2:32 p.m. OK GNU C++14 TESTS 45 46 11264000 2200
65498435 ahoraSoyPeor E Nov. 21, 2019, 5:38 p.m. OK GNU C++14 TESTS 45 77 1945600 2200
41613718 iamz E Aug. 15, 2018, 7:50 a.m. OK GNU C++14 TESTS 45 78 1843200 2200
68784461 little_misfortune E Jan. 14, 2020, 2:50 p.m. OK GNU C++14 TESTS 45 78 1945600 2200
37459989 MB1151 E April 19, 2018, 11:48 a.m. OK GNU C++14 TESTS 45 78 3379200 2200
37211186 ZhihuiLiu E April 11, 2018, 8:51 a.m. OK GNU C++14 TESTS 45 78 4608000 2200
37173497 spj_29 E April 10, 2018, 4:31 p.m. OK GNU C++14 TESTS 45 78 4812800 2200
46707544 ImpcO E Dec. 7, 2018, 8:09 a.m. OK GNU C++17 TESTS 45 93 0 2200
65516699 pootis E Nov. 22, 2019, 6:24 a.m. OK GNU C++17 TESTS 45 93 0 2200
59364238 kostia244 E Aug. 23, 2019, 4:31 p.m. OK GNU C++17 TESTS 45 93 0 2200
57984689 QieziMin E July 30, 2019, 10:54 a.m. OK GNU C++17 TESTS 45 93 0 2200
50699307 M1v1savva1601 E March 2, 2019, 7:55 p.m. OK GNU C++17 TESTS 45 93 0 2200
39015324 yashnavingoyal E June 7, 2018, 10:01 a.m. OK GNU C++17 TESTS 45 93 0 2200
38599713 Mjgonzales E May 25, 2018, 3:06 a.m. OK GNU C++17 TESTS 45 93 0 2200
69860864 I-Love-Islam E Jan. 30, 2020, 6:27 p.m. OK GNU C++17 TESTS 45 93 1740800 2200
56388625 zstu_MingSD E July 1, 2019, 11:37 a.m. OK GNU C++17 TESTS 45 93 2969600 2200
42062008 mandinga E Aug. 24, 2018, 5:35 p.m. OK GNU C++17 TESTS 45 93 3174400 2200
37253055 parth_15 E April 12, 2018, 2:18 p.m. OK Java 8 TESTS 45 155 20684800 2200
37249890 SrapZark E April 12, 2018, 12:47 p.m. OK Java 8 TESTS 45 155 20684800 2200
37187540 dalt E April 11, 2018, 5:54 a.m. OK Java 8 TESTS 45 156 20787200 2200
37232855 U_Square E April 11, 2018, 6:46 p.m. OK Java 8 TESTS 45 171 20684800 2200
37707128 PrakharJain E April 29, 2018, 11:39 a.m. OK Java 8 TESTS 45 171 20787200 2200
66514851 unicorn20141 E Dec. 8, 2019, 6:23 p.m. OK Java 8 TESTS 45 186 0 2200
51879886 Dukkha E March 26, 2019, 10:45 p.m. OK Java 8 TESTS 45 186 0 2200
37177275 SrapZark E April 10, 2018, 5:34 p.m. OK Java 8 TESTS 45 187 20684800 2200
45070626 Jarik E Oct. 29, 2018, 7:29 p.m. OK Java 8 TESTS 45 202 0 2200
37448357 4mda4mda E April 18, 2018, 9:58 p.m. OK Java 8 TESTS 45 218 20787200 2200
37473728 Anastasiya_Andreevna E April 19, 2018, 10:06 p.m. OK Mono C# TESTS 45 155 16691200 2200
37476250 vjudge1 E April 20, 2018, 2:59 a.m. OK MS C++ TESTS 45 77 3481600 2200
37175662 miha715lev E April 10, 2018, 4:52 p.m. OK MS C++ TESTS 45 265 20684800 2200
39755171 aeternalis1 E June 29, 2018, 12:27 a.m. OK PyPy 2 TESTS 45 904 17510400 2200
37177474 Savit_Gupta E April 10, 2018, 5:42 p.m. OK PyPy 2 TESTS 45 1091 49049600 2200
37176978 madn E April 10, 2018, 5:23 p.m. OK PyPy 3 TESTS 45 1060 31436800 2200
51917313 Krimpai E March 27, 2019, 11:39 p.m. OK PyPy 3 TESTS 45 1637 9830400 2200
37344651 Yash_ E April 15, 2018, 5:54 a.m. OK PyPy 3 TESTS 45 1887 31232000 2200
38435726 Ali_Pi E May 19, 2018, 3:39 p.m. OK Python 2 TESTS 45 296 12595200 2200
37178516 dpforest E April 10, 2018, 6:22 p.m. OK Python 2 TESTS 45 1294 27750400 2200
37684563 ziolekjj E April 28, 2018, 11:58 a.m. OK Python 3 TESTS 45 935 19456000 2200
37253924 AM. E April 12, 2018, 2:47 p.m. OK Python 3 TESTS 45 997 7065600 2200
37453091 yclrz E April 19, 2018, 6:02 a.m. OK Python 3 TESTS 45 998 7065600 2200
37237422 joe_joe E April 12, 2018, 2:02 a.m. OK Python 3 TESTS 45 1060 7065600 2200
37233335 pyrus E April 11, 2018, 7:18 p.m. OK Python 3 TESTS 45 1326 24678400 2200
51872314 Kelly E March 26, 2019, 5:58 p.m. OK Python 3 TESTS 45 1574 22016000 2200
37748683 pschuprikov E April 30, 2018, 1:06 p.m. OK Rust TESTS 45 171 9216000 2200
41587868 kobae964 E Aug. 14, 2018, 12:26 p.m. OK Rust TESTS 45 280 117350400 2200

remove filters

Back to search problems