Educational Codeforces Round 95 (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
1418 Educational Codeforces Round 95 (Rated for Div. 2) FINISHED False 7200 131729099 Sept. 14, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4386 ) D Trash Problem PROGRAMMING data structures hashing implementation two pointers #1418a#1418

B"Vova decided to clean his room. The room can be represented as the coordinate axis OX . There are n piles of trash in the room, coordinate of the i -th pile is the integer p_i . All piles have different coordinates. Let's define a total cleanup as the following process. The goal of this process is to collect all the piles in no more than two different x coordinates. To achieve this goal, Vova can do several (possibly, zero) moves. During one move, he can choose some x and move all piles from x to x+1 or x-1 using his broom. Note that he can't choose how many piles he will move. Also, there are two types of queries: Note that it is possible that there are zero piles of trash in the room at some moment. Vova wants to know the minimum number of moves he can spend if he wants to do a total cleanup before any queries. He also wants to know this number of moves after applying each query. Queries are applied in the given order. Note that the total cleanup doesn't actually happen and doesn't change the state of piles. It is only used to calculate the number of moves. For better understanding, please read the Notes section below to see an explanation for the first example. The first line of the input contains two integers n and q ( 1 <= n, q <= 10^5 ) -- the number of piles in the room before all queries and the number of queries, respectively. The second line of the input contains n distinct integers p_1, p_2, ... , p_n ( 1 <= p_i <= 10^9 ), where p_i is the coordinate of the i -th pile. The next q lines describe queries. The i -th query is described with two integers t_i and x_i ( 0 <= t_i <= 1; 1 <= x_i <= 10^9 ), where t_i is 0 if you need to remove a pile from the coordinate x_i and is 1 if you need to add a pile to the coordinate x_i . It is guaranteed that for t_i = 0 there is such pile in the c"...

Tutorials

Unofficial Editorial for Educational Round 95 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
92865713 DXTsT D Sept. 15, 2020, 1:49 a.m. OK Clang++17 Diagnostics TESTS 56 1840 14643200
92834752 pengin_2000 D Sept. 14, 2020, 4:13 p.m. OK GNU C11 TESTS 50 608 13209600
92866662 lwz159 D Sept. 15, 2020, 2:24 a.m. OK GNU C++11 TESTS 56 171 13107200
92833815 ICANTAKIOI D Sept. 14, 2020, 4:08 p.m. OK GNU C++11 TESTS 50 202 12288000
92866873 mading D Sept. 15, 2020, 2:31 a.m. OK GNU C++11 TESTS 56 233 10137600
92864731 angrysqrt3 D Sept. 15, 2020, 1:11 a.m. OK GNU C++11 TESTS 56 233 10444800
92864328 Rewritetxdy D Sept. 15, 2020, 12:55 a.m. OK GNU C++11 TESTS 56 234 10137600
92838333 Qza_AC D Sept. 14, 2020, 4:28 p.m. OK GNU C++11 TESTS 50 265 15257600
92842388 cy90 D Sept. 14, 2020, 4:53 p.m. OK GNU C++11 TESTS 50 280 9625600
92838109 cfabcdhhhh D Sept. 14, 2020, 4:27 p.m. OK GNU C++11 TESTS 50 280 10137600
92845426 MohamedSameh D Sept. 14, 2020, 5:24 p.m. OK GNU C++11 TESTS 50 296 8704000
92839917 fuxiaoxin D Sept. 14, 2020, 4:34 p.m. OK GNU C++11 TESTS 50 312 19558400
92830488 00max09 D Sept. 14, 2020, 3:56 p.m. OK GNU C++14 TESTS 50 233 9830400
92832123 yongjun18 D Sept. 14, 2020, 4:02 p.m. OK GNU C++14 TESTS 50 264 7782400
92842942 mediteran13 D Sept. 14, 2020, 4:59 p.m. OK GNU C++14 TESTS 50 264 8601600
92838846 pichulia D Sept. 14, 2020, 4:30 p.m. OK GNU C++14 TESTS 50 264 20787200
92828754 Ramu D Sept. 14, 2020, 3:50 p.m. OK GNU C++14 TESTS 50 280 8089600
92835544 Drice D Sept. 14, 2020, 4:16 p.m. OK GNU C++14 TESTS 50 280 14745600
92842475 harsh639 D Sept. 14, 2020, 4:54 p.m. OK GNU C++14 TESTS 50 296 7782400
92843399 orangecalculator D Sept. 14, 2020, 5:03 p.m. OK GNU C++14 TESTS 50 296 10752000
92842472 NaimSS D Sept. 14, 2020, 4:54 p.m. OK GNU C++14 TESTS 50 296 14950400
92863132 Paradox512 D Sept. 14, 2020, 11:52 p.m. OK GNU C++14 TESTS 56 296 26521600
92837127 trie D Sept. 14, 2020, 4:23 p.m. OK GNU C++17 TESTS 50 202 80179200
92834456 hnust_qinhaoyuan D Sept. 14, 2020, 4:11 p.m. OK GNU C++17 TESTS 50 217 24371200
92866279 wow_Wonderful D Sept. 15, 2020, 2:11 a.m. OK GNU C++17 TESTS 56 234 25702400
92837572 wow_Wonderful D Sept. 14, 2020, 4:25 p.m. OK GNU C++17 TESTS 50 234 25702400
92839525 goodnight007 D Sept. 14, 2020, 4:33 p.m. OK GNU C++17 TESTS 50 234 56115200
92868136 goodnight007 D Sept. 15, 2020, 3:09 a.m. OK GNU C++17 TESTS 56 234 56115200
92835067 Aphelios D Sept. 14, 2020, 4:14 p.m. OK GNU C++17 TESTS 50 264 15974400
92828877 coreproject.yaking D Sept. 14, 2020, 3:50 p.m. OK GNU C++17 TESTS 50 265 7782400
92854195 Quartermelon D Sept. 14, 2020, 7:11 p.m. OK GNU C++17 TESTS 56 265 13619200
92858628 kaiboy D Sept. 14, 2020, 8:31 p.m. OK GNU C++17 TESTS 56 280 7782400
92846452 bot_yaya D Sept. 14, 2020, 5:34 p.m. OK GNU C++17 (64) TESTS 50 312 18432000
92840220 L_I_Erq34 D Sept. 14, 2020, 4:37 p.m. OK GNU C++17 (64) TESTS 50 326 11571200
92844185 silverfish D Sept. 14, 2020, 5:11 p.m. OK GNU C++17 (64) TESTS 50 327 11264000
92837499 eThAnE D Sept. 14, 2020, 4:25 p.m. OK GNU C++17 (64) TESTS 50 327 12390400
92862669 Ari D Sept. 14, 2020, 11:24 p.m. OK GNU C++17 (64) TESTS 56 374 10956800
92843333 M0riarty D Sept. 14, 2020, 5:03 p.m. OK GNU C++17 (64) TESTS 50 374 20582400
92855414 roshan_mehta D Sept. 14, 2020, 7:30 p.m. OK GNU C++17 (64) TESTS 56 389 13107200
92853954 roshan_mehta D Sept. 14, 2020, 7:07 p.m. OK GNU C++17 (64) TESTS 56 389 20172800
92839049 Shirakami D Sept. 14, 2020, 4:31 p.m. OK GNU C++17 (64) TESTS 50 390 20172800
92842221 natsugiri D Sept. 14, 2020, 4:52 p.m. OK GNU C++17 (64) TESTS 50 405 19660800
92836711 maguroguma D Sept. 14, 2020, 4:21 p.m. OK Go TESTS 50 405 11673600
92862288 skittles1412 D Sept. 14, 2020, 11:01 p.m. OK Java 11 TESTS 56 654 15155200
92844990 Apfeloxid D Sept. 14, 2020, 5:19 p.m. OK Java 11 TESTS 50 764 8089600
92868423 slinSSS D Sept. 15, 2020, 3:17 a.m. OK Java 11 TESTS 56 1091 9932800
92848177 saikaushik D Sept. 14, 2020, 5:54 p.m. OK Java 11 TESTS 50 1106 14336000
92839616 vlam21 D Sept. 14, 2020, 4:33 p.m. OK Java 11 TESTS 50 1107 13414400
92868996 slinSSS D Sept. 15, 2020, 3:33 a.m. OK Java 11 TESTS 56 1169 7884800
92856577 kostasanemozalis D Sept. 14, 2020, 7:47 p.m. OK Java 11 TESTS 56 1185 12083200
92869593 slinSSS D Sept. 15, 2020, 3:49 a.m. OK Java 11 TESTS 56 1201 7884800
92835790 Dukkha D Sept. 14, 2020, 4:17 p.m. OK Java 11 TESTS 50 1232 8704000
92858599 saiprasadDuduka D Sept. 14, 2020, 8:30 p.m. OK Java 11 TESTS 56 1232 27545600
92838444 ShesMyNerd D Sept. 14, 2020, 4:29 p.m. OK Java 8 TESTS 50 577 3993600
92835725 flyman3046 D Sept. 14, 2020, 4:17 p.m. OK Java 8 TESTS 50 592 7577600
92846324 gawsfbet D Sept. 14, 2020, 5:33 p.m. OK Java 8 TESTS 50 592 9113600
92837538 G.A.T.C D Sept. 14, 2020, 4:25 p.m. OK Java 8 TESTS 50 639 8601600
92849126 idk321 D Sept. 14, 2020, 6:04 p.m. OK Java 8 TESTS 50 670 12492800
92850407 lzhang D Sept. 14, 2020, 6:19 p.m. OK Java 8 TESTS 50 670 13824000
92865850 MartyByrde D Sept. 15, 2020, 1:54 a.m. OK Java 8 TESTS 56 716 5222400
92842216 subhamdtu D Sept. 14, 2020, 4:52 p.m. OK Java 8 TESTS 50 842 27852800
92847793 a.wang D Sept. 14, 2020, 5:49 p.m. OK Java 8 TESTS 50 857 11980800
92843733 godxpunk D Sept. 14, 2020, 5:07 p.m. OK Java 8 TESTS 50 966 7782400
92832808 koper D Sept. 14, 2020, 4:04 p.m. OK Kotlin TESTS 50 1496 14950400
92832725 SlavaG D Sept. 14, 2020, 4:04 p.m. OK Kotlin TESTS 50 1513 12083200
92837914 fgwiebfaoish D Sept. 14, 2020, 4:27 p.m. OK Mono C# TESTS 50 592 20992000
92835248 hibatibati D Sept. 14, 2020, 4:15 p.m. OK Mono C# TESTS 50 639 19865600
92830267 mban259 D Sept. 14, 2020, 3:55 p.m. OK Mono C# TESTS 50 873 22630400
92839199 azukun D Sept. 14, 2020, 4:32 p.m. OK Mono C# TESTS 50 1076 28160000
92845043 youx D Sept. 14, 2020, 5:20 p.m. OK MS C++ 2017 TESTS 50 420 24883200
92842894 Cube219 D Sept. 14, 2020, 4:58 p.m. OK MS C++ 2017 TESTS 50 468 9625600
92837300 Gravekper D Sept. 14, 2020, 4:24 p.m. OK MS C++ 2017 TESTS 50 529 9216000
92828624 Me_and_Ivan D Sept. 14, 2020, 3:49 p.m. OK MS C++ 2017 TESTS 50 670 12902400
92853118 3funnn D Sept. 14, 2020, 6:55 p.m. OK MS C++ 2017 TESTS 56 764 13312000
92872718 little_lion D Sept. 15, 2020, 5:06 a.m. OK MS C++ 2017 TESTS 56 998 12902400
92841456 mlihua09 D Sept. 14, 2020, 4:45 p.m. OK MS C++ 2017 TESTS 50 1107 19763200
92851360 beethoven97 D Sept. 14, 2020, 6:31 p.m. OK PyPy 2 TESTS 50 1746 30822400
92850075 beethoven97 D Sept. 14, 2020, 6:15 p.m. OK PyPy 2 TESTS 50 1855 25804800
92844446 mkawa2 D Sept. 14, 2020, 5:14 p.m. OK PyPy 3 TESTS 50 1263 108953600
92841485 r57shell D Sept. 14, 2020, 4:46 p.m. OK PyPy 3 TESTS 50 1326 39731200
92841024 r57shell D Sept. 14, 2020, 4:42 p.m. OK PyPy 3 TESTS 50 1715 39628800
92833254 wattaihei D Sept. 14, 2020, 4:06 p.m. OK PyPy 3 TESTS 50 1778 51609600
92862989 deadguy D Sept. 14, 2020, 11:43 p.m. OK PyPy 3 TESTS 56 1934 21811200
92848549 sh1194 D Sept. 14, 2020, 5:58 p.m. OK PyPy 3 TESTS 50 2121 39219200
92848383 sh1194 D Sept. 14, 2020, 5:56 p.m. OK PyPy 3 TESTS 50 2121 39321600
92845640 patahene D Sept. 14, 2020, 5:26 p.m. OK PyPy 3 TESTS 50 2527 78438400
92846574 patahene D Sept. 14, 2020, 5:35 p.m. OK PyPy 3 TESTS 50 2605 78336000
92849497 patahene D Sept. 14, 2020, 6:09 p.m. OK PyPy 3 TESTS 50 2651 78438400
92833605 akks800 D Sept. 14, 2020, 4:08 p.m. OK Rust TESTS 50 249 6246400

remove filters

Back to search problems