Codeforces Round 892 (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
1859 Codeforces Round 892 (Div. 2) FINISHED False 7200 45329063 Aug. 12, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7227 ) D Andrey and Escape from Capygrad PROGRAMMING binary search data structures dp ds greedy sortings two pointers

B'An incident occurred in Capygrad, the capital of Tyagoland, where all the capybaras in the city went crazy and started throwing mandarins. Andrey was forced to escape from the city as far as possible, using portals. Tyagoland is represented by a number line, and the city of Capygrad is located at point 0 . There are n portals all over Tyagoland, each of which is characterised by four integers l_i , r_i , a_i and b_i ( 1 <= l_i <= a_i <= b_i <= r_i <= 10^9 ). Note that the segment [a_i, b_i] is contained in the segment [l_i, r_i] . If Andrey is on the segment [l_i, r_i] , then the portal can teleport him to any point on the segment [a_i, b_i] . Andrey has a pass that allows him to use the portals an unlimited number of times. Andrey thinks that the point x is on the segment [l, r] if the inequality l <= x <= r is satisfied. Andrey has q options for where to start his escape, each option is characterized by a single integer x_i -- the starting position of the escape. He wants to escape from Capygrad as far as possible (to the point with the maximum possible coordinate). Help Andrey determine how far he could escape from Capygrad, starting at each of the q positions. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of sets of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of portals. Each of the next n lines contains four integers l_i , r_i , a_i , and b_i (1 <= l_i <= a_i <= b_i <= r_i <= 10^9) -- the characteristics of the portals. The next line contains a single integer q ( 1 <= q <= 2 cdot 10^5 ) -- the number of positions. The following line contains q integers x_1, x_2, ldots, x_q ( 1 <= '...

Tutorials

Video solutions from Geothermal.

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
218576939 pengin_2000 D Aug. 12, 2023, 4:34 p.m. OK GNU C11 TESTS 36 1840 5632000
218611655 a999999 D Aug. 13, 2023, 12:28 a.m. OK GNU C++14 TESTS 36 124 11571200
218612965 wuminging D Aug. 13, 2023, 1:07 a.m. OK GNU C++14 TESTS 36 249 3174400
218620242 ccsu_zx D Aug. 13, 2023, 3:36 a.m. OK GNU C++14 TESTS 36 265 3174400
218575483 Tom0703 D Aug. 12, 2023, 4:31 p.m. OK GNU C++14 TESTS 36 265 4812800
218573297 qqqaaazzz D Aug. 12, 2023, 4:26 p.m. OK GNU C++14 TESTS 36 280 3174400
218581739 Nyanya_ D Aug. 12, 2023, 5:16 p.m. OK GNU C++14 TESTS 36 280 3174400
218602942 Gold_Dragon D Aug. 12, 2023, 8:49 p.m. OK GNU C++14 TESTS 36 280 3584000
218573962 iczx D Aug. 12, 2023, 4:28 p.m. OK GNU C++14 TESTS 36 295 5632000
218615642 cgy2022 D Aug. 13, 2023, 2:07 a.m. OK GNU C++14 TESTS 36 296 3686400
218571922 kawai_0v0_ D Aug. 12, 2023, 4:23 p.m. OK GNU C++14 TESTS 36 296 7475200
218620169 Grenier D Aug. 13, 2023, 3:35 a.m. OK GNU C++17 TESTS 36 249 4198400
218580085 linwenqi D Aug. 12, 2023, 5:09 p.m. OK GNU C++17 TESTS 36 265 3174400
218576553 zeemanz D Aug. 12, 2023, 4:33 p.m. OK GNU C++17 TESTS 36 265 4812800
218573975 juzixiong D Aug. 12, 2023, 4:28 p.m. OK GNU C++17 TESTS 36 280 4812800
218574700 k1671k D Aug. 12, 2023, 4:29 p.m. OK GNU C++17 TESTS 36 280 7168000
218620291 Grenier D Aug. 13, 2023, 3:37 a.m. OK GNU C++17 TESTS 36 295 7884800
218576770 KKK D Aug. 12, 2023, 4:33 p.m. OK GNU C++17 TESTS 36 296 2969600
218590924 Muelsyse_ D Aug. 12, 2023, 6:21 p.m. OK GNU C++17 TESTS 36 296 3686400
218581413 Muelsyse_ D Aug. 12, 2023, 5:15 p.m. OK GNU C++17 TESTS 36 296 7884800
218623962 slim-doggy D Aug. 13, 2023, 4:37 a.m. OK GNU C++17 TESTS 36 311 6041600
218602119 Krzychuo D Aug. 12, 2023, 8:37 p.m. OK GNU C++17 (64) TESTS 36 233 3788800
218599288 I_Will_Succeed_Some_Day D Aug. 12, 2023, 7:55 p.m. OK GNU C++17 (64) TESTS 36 233 6860800
218616385 Dr.killer D Aug. 13, 2023, 2:21 a.m. OK GNU C++17 (64) TESTS 36 234 3481600
218585570 0ioi0mou0oOm0 D Aug. 12, 2023, 5:38 p.m. OK GNU C++17 (64) TESTS 36 234 5017600
218627919 yangjl D Aug. 13, 2023, 5:33 a.m. OK GNU C++17 (64) TESTS 36 234 5529600
218614541 M_Rana D Aug. 13, 2023, 1:44 a.m. OK GNU C++17 (64) TESTS 36 248 6860800
218571664 Leonid_Ich D Aug. 12, 2023, 4:23 p.m. OK GNU C++17 (64) TESTS 36 249 3481600
218581076 hhux D Aug. 12, 2023, 5:13 p.m. OK GNU C++17 (64) TESTS 36 249 5836800
218595435 lazymystic D Aug. 12, 2023, 7:09 p.m. OK GNU C++17 (64) TESTS 36 249 6860800
218617798 YaoLingF D Aug. 13, 2023, 2:50 a.m. OK GNU C++17 (64) TESTS 36 249 11468800
218572115 _YXJS_ D Aug. 12, 2023, 4:24 p.m. OK GNU C++20 (64) TESTS 36 140 4198400
218628501 xdz_ D Aug. 13, 2023, 5:41 a.m. OK GNU C++20 (64) TESTS 36 171 2764800
218619541 fifty-seven57 D Aug. 13, 2023, 3:23 a.m. OK GNU C++20 (64) TESTS 36 171 3174400
218623004 hartiksalaria D Aug. 13, 2023, 4:23 a.m. OK GNU C++20 (64) TESTS 36 171 3481600
218622145 Aicu D Aug. 13, 2023, 4:09 a.m. OK GNU C++20 (64) TESTS 36 171 3481600
218593282 rgnerdplayer D Aug. 12, 2023, 6:44 p.m. OK GNU C++20 (64) TESTS 36 171 3481600
218588162 asdfgrace D Aug. 12, 2023, 5:58 p.m. OK GNU C++20 (64) TESTS 36 171 3481600
218586266 spacetimewww D Aug. 12, 2023, 5:43 p.m. OK GNU C++20 (64) TESTS 36 171 3481600
218584504 Kareem_Khaled D Aug. 12, 2023, 5:31 p.m. OK GNU C++20 (64) TESTS 36 171 3481600
218625544 Darumaka D Aug. 13, 2023, 5:01 a.m. OK GNU C++20 (64) TESTS 36 171 3481600
218583764 themadknight45 D Aug. 12, 2023, 5:27 p.m. OK Java 11 TESTS 36 545 6656000
218629498 Panther369 D Aug. 13, 2023, 5:54 a.m. OK Java 11 TESTS 36 623 4403200
218573007 godxpunk D Aug. 12, 2023, 4:26 p.m. OK Java 11 TESTS 36 779 29184000
218571956 pakkapapad D Aug. 12, 2023, 4:23 p.m. OK Java 11 TESTS 36 826 15769600
218601110 dzhi D Aug. 12, 2023, 8:21 p.m. OK Java 11 TESTS 36 1106 58265600
218629320 Prime369 D Aug. 13, 2023, 5:52 a.m. OK Java 17 TESTS 36 655 4812800
218588048 pt_dtu D Aug. 12, 2023, 5:57 p.m. OK Java 17 TESTS 36 779 25600000
218581580 Dukkha D Aug. 12, 2023, 5:15 p.m. OK Java 17 TESTS 36 966 44441600
218602314 codeanand17 D Aug. 12, 2023, 8:39 p.m. OK Java 17 TESTS 36 982 7168000
218573648 architsangal D Aug. 12, 2023, 4:27 p.m. OK Java 17 TESTS 36 1247 29286400
218602462 5ps D Aug. 12, 2023, 8:42 p.m. OK Java 17 TESTS 36 1341 29388800
218588311 aryangupta1604 D Aug. 12, 2023, 5:59 p.m. OK Java 17 TESTS 36 1559 24576000
218581830 5ps D Aug. 12, 2023, 5:16 p.m. OK Java 17 TESTS 36 1808 31436800
218571599 5ps D Aug. 12, 2023, 4:23 p.m. OK Java 17 TESTS 36 1934 32665600
218580580 sidmal45 D Aug. 12, 2023, 5:12 p.m. OK Java 8 TESTS 36 436 17100800
218580154 roeyr D Aug. 12, 2023, 5:09 p.m. OK Java 8 TESTS 36 498 3891200
218616925 QUITTING D Aug. 13, 2023, 2:32 a.m. OK Java 8 TESTS 36 670 13004800
218588562 vatsal_04 D Aug. 12, 2023, 6:01 p.m. OK Java 8 TESTS 36 685 21299200
218619721 Yousef_Badr D Aug. 13, 2023, 3:27 a.m. OK Java 8 TESTS 36 1029 54988800
218583247 Bipul70701 D Aug. 12, 2023, 5:24 p.m. OK Java 8 TESTS 36 1325 62771200
218603428 AlterAccount D Aug. 12, 2023, 8:57 p.m. OK Java 8 TESTS 36 1715 41779200
218611302 maxK99 D Aug. 13, 2023, 12:15 a.m. OK MS C++ 2017 TESTS 36 1014 7680000
218593712 Timonnable D Aug. 12, 2023, 6:48 p.m. OK MS C++ 2017 TESTS 36 1075 16076800
218575822 Ishi07 D Aug. 12, 2023, 4:32 p.m. OK MS C++ 2017 TESTS 36 1107 5222400
218582043 ahtoh_ D Aug. 12, 2023, 5:17 p.m. OK Node.js TESTS 36 764 69120000
218580849 misorin D Aug. 12, 2023, 5:12 p.m. OK PyPy 3-64 TESTS 36 280 47923200
218587738 bronze_coder D Aug. 12, 2023, 5:54 p.m. OK PyPy 3-64 TESTS 36 389 30310400
218587655 bronze_coder D Aug. 12, 2023, 5:53 p.m. OK PyPy 3-64 TESTS 36 499 30310400
218580545 Little_Sheep_Yawn D Aug. 12, 2023, 5:12 p.m. OK PyPy 3-64 TESTS 36 717 68505600
218626131 gardengnome D Aug. 13, 2023, 5:09 a.m. OK PyPy 3-64 TESTS 36 780 72192000
218589765 gardengnome D Aug. 12, 2023, 6:11 p.m. OK PyPy 3-64 TESTS 36 795 69427200
218589026 CinaDor D Aug. 12, 2023, 6:05 p.m. OK PyPy 3-64 TESTS 36 811 69120000
218626294 gardengnome D Aug. 13, 2023, 5:12 a.m. OK PyPy 3-64 TESTS 36 857 70758400
218625873 gardengnome D Aug. 13, 2023, 5:06 a.m. OK PyPy 3-64 TESTS 36 857 72294400
218584928 AyuAnchor D Aug. 12, 2023, 5:34 p.m. OK PyPy 3-64 TESTS 36 873 47001600
218625848 smaheshwari2304 D Aug. 13, 2023, 5:05 a.m. OK Python 3 TESTS 36 1387 63590400
218626980 yeshwanth_216 D Aug. 13, 2023, 5:21 a.m. OK Python 3 TESTS 36 1419 82124800
218620591 akshay30246 D Aug. 13, 2023, 3:43 a.m. OK Python 3 TESTS 36 1419 82124800
218608844 mockingbirdd D Aug. 12, 2023, 10:54 p.m. OK Python 3 TESTS 36 1528 96972800
218582065 okay4869 D Aug. 12, 2023, 5:18 p.m. OK Python 3 TESTS 36 1622 57958400
218625735 smaheshwari2304 D Aug. 13, 2023, 5:03 a.m. OK Python 3 TESTS 36 1825 97792000
218593825 smaheshwari2304 D Aug. 12, 2023, 6:50 p.m. OK Python 3 TESTS 36 1996 89395200

remove filters

Back to search problems