Codeforces Round 667 (Div. 3)

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
1409 Codeforces Round 667 (Div. 3) FINISHED False 7200 137949863 Sept. 4, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7928 ) E Two Platforms PROGRAMMING binary search dp sortings two pointers

B'There are n points on a plane. The i -th point has coordinates (x_i, y_i) . You have two horizontal platforms, both of length k . Each platform can be placed anywhere on a plane but it should be placed horizontally (on the same y -coordinate) and have integer borders. If the left border of the platform is (x, y) then the right border is (x + k, y) and all points between borders (including borders) belong to the platform. Note that platforms can share common points (overlap) and it is not necessary to place both platforms on the same y -coordinate. When you place both platforms on a plane, all points start falling down decreasing their y -coordinate. If a point collides with some platform at some moment, the point stops and is saved. Points which never collide with any platform are lost. Your task is to find the maximum number of points you can save if you place both platforms optimally. You have to answer t independent test cases. For better understanding, please read the Note section below to see a picture for the first test case. The first line of the input contains one integer t ( 1 <= t <= 2 cdot 10^4 ) -- the number of test cases. Then t test cases follow. The first line of the test case contains two integers n and k ( 1 <= n <= 2 cdot 10^5 ; 1 <= k <= 10^9 ) -- the number of points and the length of each platform, respectively. The second line of the test case contains n integers x_1, x_2, ... , x_n ( 1 <= x_i <= 10^9 ), where x_i is x -coordinate of the i -th point. The third line of the input contains n integers y_1, y_2, ... , y_n ( 1 <= y_i <= 10^9 ), where y_i is y -coordinate of the i -th point. All points are distinct (there is no pair 1 <= i < j <= n such that x_i = x_j and y_i = y_j ). It is guaranteed that the sum of n does not exceed 2 cdot 10'...

Tutorials

Codeforces Round #667 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
91909782 samari06 E Sept. 5, 2020, 5:40 a.m. OK GNU C11 TESTS 48 156 4915200
91906354 w616561153 E Sept. 5, 2020, 4:34 a.m. OK GNU C++11 TESTS 48 62 819200
91900457 do_while_true E Sept. 5, 2020, 1:51 a.m. OK GNU C++11 TESTS 48 62 1638400
91910321 lzzAKIOI E Sept. 5, 2020, 5:50 a.m. OK GNU C++11 TESTS 48 62 3276800
91873517 xxxyd E Sept. 4, 2020, 4:31 p.m. OK GNU C++11 TESTS 48 62 3993600
91871449 Leidaxxb E Sept. 4, 2020, 4:26 p.m. OK GNU C++11 TESTS 48 62 4812800
91905040 luogu_bot3 E Sept. 5, 2020, 4:02 a.m. OK GNU C++11 TESTS 48 62 5632000
91879960 201831990439 E Sept. 4, 2020, 5:03 p.m. OK GNU C++11 TESTS 48 62 20582400
91879745 Feng E Sept. 4, 2020, 5:01 p.m. OK GNU C++11 TESTS 48 62 88166400
91872575 Sky_Arrow E Sept. 4, 2020, 4:29 p.m. OK GNU C++11 TESTS 48 78 3993600
91876865 Feng E Sept. 4, 2020, 4:39 p.m. OK GNU C++11 TESTS 48 78 104243200
91901151 eniacding E Sept. 5, 2020, 2:14 a.m. OK GNU C++14 TESTS 48 124 3481600
91888288 ssanjeev2424 E Sept. 4, 2020, 7 p.m. OK GNU C++14 TESTS 48 139 2457600
91887971 giorgitarkh E Sept. 4, 2020, 6:55 p.m. OK GNU C++14 TESTS 48 140 2355200
91891378 laleeds11111 E Sept. 4, 2020, 7:58 p.m. OK GNU C++14 TESTS 48 140 2457600
91873044 preyam E Sept. 4, 2020, 4:30 p.m. OK GNU C++14 TESTS 48 140 2457600
91906621 BTSprathampatel E Sept. 5, 2020, 4:40 a.m. OK GNU C++14 TESTS 48 140 2457600
91896166 utkarsh73 E Sept. 4, 2020, 10:27 p.m. OK GNU C++14 TESTS 48 140 2662400
91902076 vjudge1 E Sept. 5, 2020, 2:46 a.m. OK GNU C++14 TESTS 48 140 4812800
91900668 Wi1der E Sept. 5, 2020, 1:59 a.m. OK GNU C++14 TESTS 48 140 4812800
91889269 Nasif_44th E Sept. 4, 2020, 7:17 p.m. OK GNU C++14 TESTS 48 140 5632000
91886441 Qiping_yan.cn E Sept. 4, 2020, 6:28 p.m. OK GNU C++17 TESTS 48 139 3481600
91883759 lukkka E Sept. 4, 2020, 5:50 p.m. OK GNU C++17 TESTS 48 140 1843200
91879018 11eyes E Sept. 4, 2020, 4:54 p.m. OK GNU C++17 TESTS 48 140 1843200
91897891 PitzTech E Sept. 4, 2020, 11:50 p.m. OK GNU C++17 TESTS 48 140 2457600
91876523 __peanut E Sept. 4, 2020, 4:38 p.m. OK GNU C++17 TESTS 48 140 2457600
91888556 kush_153 E Sept. 4, 2020, 7:05 p.m. OK GNU C++17 TESTS 48 140 2457600
91893664 penguinhacker E Sept. 4, 2020, 9:01 p.m. OK GNU C++17 TESTS 48 140 2662400
91884458 pedro.racchetti E Sept. 4, 2020, 5:59 p.m. OK GNU C++17 TESTS 48 140 2662400
91893962 t4c0 E Sept. 4, 2020, 9:10 p.m. OK GNU C++17 TESTS 48 140 2867200
91902961 hunxuewangzi E Sept. 5, 2020, 3:10 a.m. OK GNU C++17 TESTS 48 140 3174400
91903396 __declspec E Sept. 5, 2020, 3:23 a.m. OK GNU C++17 (64) TESTS 48 93 4096000
91906501 it_aint_me E Sept. 5, 2020, 4:38 a.m. OK GNU C++17 (64) TESTS 48 108 2457600
91889952 conquizztador E Sept. 4, 2020, 7:30 p.m. OK GNU C++17 (64) TESTS 48 108 3481600
91891827 keepers E Sept. 4, 2020, 8:09 p.m. OK GNU C++17 (64) TESTS 48 108 4403200
91880151 neal E Sept. 4, 2020, 5:05 p.m. OK GNU C++17 (64) TESTS 48 109 1638400
91884984 Rahul E Sept. 4, 2020, 6:07 p.m. OK GNU C++17 (64) TESTS 48 109 1638400
91901226 Juvitus E Sept. 5, 2020, 2:17 a.m. OK GNU C++17 (64) TESTS 48 109 2457600
91885408 Arturoku E Sept. 4, 2020, 6:13 p.m. OK GNU C++17 (64) TESTS 48 109 2457600
91877332 smax E Sept. 4, 2020, 4:42 p.m. OK GNU C++17 (64) TESTS 48 109 2457600
91908666 Clu3l3ss E Sept. 5, 2020, 5:20 a.m. OK GNU C++17 (64) TESTS 48 109 2457600
91890198 skittles1412 E Sept. 4, 2020, 7:34 p.m. OK Java 11 TESTS 48 217 307200
91894488 Richard727 E Sept. 4, 2020, 9:26 p.m. OK Java 11 TESTS 48 311 19558400
91885001 Apass.Jack E Sept. 4, 2020, 6:07 p.m. OK Java 11 TESTS 48 326 6348800
91892827 Richard727 E Sept. 4, 2020, 8:37 p.m. OK Java 11 TESTS 48 358 8089600
91881409 noDreams E Sept. 4, 2020, 5:19 p.m. OK Java 11 TESTS 48 358 10035200
91890478 jaynils E Sept. 4, 2020, 7:39 p.m. OK Java 11 TESTS 48 358 10854400
91907360 UniverseofHK E Sept. 5, 2020, 4:55 a.m. OK Java 11 TESTS 48 374 9113600
91873483 learner_cf E Sept. 4, 2020, 4:31 p.m. OK Java 11 TESTS 48 499 28979200
91910278 satya26 E Sept. 5, 2020, 5:49 a.m. OK Java 11 TESTS 48 561 58265600
91878882 rreeennnnn E Sept. 4, 2020, 4:53 p.m. OK Java 11 TESTS 48 576 26521600
91885428 Ad-007 E Sept. 4, 2020, 6:14 p.m. OK Java 8 TESTS 48 264 0
91872480 SrapZark E Sept. 4, 2020, 4:29 p.m. OK Java 8 TESTS 48 265 18739200
91885116 mwen E Sept. 4, 2020, 6:09 p.m. OK Java 8 TESTS 48 280 13721600
91899860 sumitnitesh123 E Sept. 5, 2020, 1:28 a.m. OK Java 8 TESTS 48 327 23756800
91904938 sudhanshu_lucky E Sept. 5, 2020, 4 a.m. OK Java 8 TESTS 48 327 25088000
91902056 2020akadaver E Sept. 5, 2020, 2:45 a.m. OK Java 8 TESTS 48 343 18739200
91879249 MubtasimShahriar E Sept. 4, 2020, 4:56 p.m. OK Java 8 TESTS 48 436 5734400
91873940 a_2410 E Sept. 4, 2020, 4:31 p.m. OK Java 8 TESTS 48 436 22220800
91887663 AayushICS E Sept. 4, 2020, 6:49 p.m. OK Java 8 TESTS 48 436 24678400
91882606 noobie_code E Sept. 4, 2020, 5:34 p.m. OK Java 8 TESTS 48 499 20582400
91880747 zloyrobot E Sept. 4, 2020, 5:11 p.m. OK Kotlin TESTS 48 327 18432000
91873080 koboshi E Sept. 4, 2020, 4:30 p.m. OK Kotlin TESTS 48 467 29798400
91871470 popco E Sept. 4, 2020, 4:27 p.m. OK Mono C# TESTS 48 249 32256000
91887440 fgwiebfaoish E Sept. 4, 2020, 6:45 p.m. OK Mono C# TESTS 48 405 46284800
91898855 reikiriyama E Sept. 5, 2020, 12:40 a.m. OK MS C++ 2017 TESTS 48 390 1024000
91889275 hajab E Sept. 4, 2020, 7:17 p.m. OK PyPy 2 TESTS 48 717 19763200
91889152 hajab E Sept. 4, 2020, 7:15 p.m. OK PyPy 2 TESTS 48 717 20480000
91888185 shehebe E Sept. 4, 2020, 6:58 p.m. OK PyPy 2 TESTS 48 748 18432000
91907776 gintoki_s E Sept. 5, 2020, 5:04 a.m. OK PyPy 3 TESTS 48 265 23244800
91884737 Satwik_Tiwari E Sept. 4, 2020, 6:03 p.m. OK PyPy 3 TESTS 48 545 31744000
91893520 cs17btech11002 E Sept. 4, 2020, 8:56 p.m. OK PyPy 3 TESTS 48 577 25088000
91891492 DeepBorys E Sept. 4, 2020, 8 p.m. OK PyPy 3 TESTS 48 607 22528000
91907535 _viru_ E Sept. 5, 2020, 4:59 a.m. OK PyPy 3 TESTS 48 608 25702400
91905683 ss7890 E Sept. 5, 2020, 4:18 a.m. OK PyPy 3 TESTS 48 623 21299200
91886167 ghoshashis545 E Sept. 4, 2020, 6:24 p.m. OK PyPy 3 TESTS 48 702 25702400
91877833 Pedantic E Sept. 4, 2020, 4:45 p.m. OK PyPy 3 TESTS 48 748 21299200
91880091 myotra E Sept. 4, 2020, 5:04 p.m. OK PyPy 3 TESTS 48 780 35840000
91882768 myotra E Sept. 4, 2020, 5:36 p.m. OK PyPy 3 TESTS 48 795 43212800
91887254 mathwizurd E Sept. 4, 2020, 6:41 p.m. OK Python 3 TESTS 48 638 21299200
91880041 sh1194 E Sept. 4, 2020, 5:04 p.m. OK Python 3 TESTS 48 639 20889600
91879693 sh1194 E Sept. 4, 2020, 5 p.m. OK Python 3 TESTS 48 670 20889600
91883713 Hitman_09 E Sept. 4, 2020, 5:49 p.m. OK Python 3 TESTS 48 732 23654400
91887576 Ayushman_500 E Sept. 4, 2020, 6:47 p.m. OK Python 3 TESTS 48 1091 21094400
91876105 mkawa2 E Sept. 4, 2020, 4:34 p.m. OK Python 3 TESTS 48 1497 33792000
91874400 fatemender E Sept. 4, 2020, 4:32 p.m. OK Rust TESTS 48 280 14233600
91902009 gazaan E Sept. 5, 2020, 2:43 a.m. OK Scala TESTS 48 888 25600000

remove filters

Back to search problems