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 |
---|---|---|---|---|---|---|
1401 | Codeforces Round 665 (Div. 2) | FINISHED | False | 7200 | 139159463 | Aug. 21, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2471 ) | E | Divide Square | PROGRAMMING | data structures divide and conquer geometry implementation sortings |
B"There is a square of size 10^6 x 10^6 on the coordinate plane with four points (0, 0) , (0, 10^6) , (10^6, 0) , and (10^6, 10^6) as its vertices. You are going to draw segments on the plane. All segments are either horizontal or vertical and intersect with at least one side of the square. Now you are wondering how many pieces this square divides into after drawing all segments. Write a program calculating the number of pieces of the square. The first line contains two integers n and m ( 0 <= n, m <= 10^5 ) -- the number of horizontal segments and the number of vertical segments. The next n lines contain descriptions of the horizontal segments. The i -th line contains three integers y_i , lx_i and rx_i ( 0 < y_i < 10^6 ; 0 <= lx_i < rx_i <= 10^6 ), which means the segment connects (lx_i, y_i) and (rx_i, y_i) . The next m lines contain descriptions of the vertical segments. The i -th line contains three integers x_i , ly_i and ry_i ( 0 < x_i < 10^6 ; 0 <= ly_i < ry_i <= 10^6 ), which means the segment connects (x_i, ly_i) and (x_i, ry_i) . It's guaranteed that there are no two segments on the same line, and each segment intersects with at least one of square's sides. Print the number of pieces the square is divided into after drawing all the segments. The sample is like this: "... |
Codeforces Round #665 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
90883301 | vjudge6 | E | Aug. 25, 2020, 8:43 a.m. | OK | GNU C++11 | TESTS | 36 | 62 | 18124800 | ||
91483949 | 201831990439 | E | Aug. 31, 2020, 11:03 a.m. | OK | GNU C++11 | TESTS | 36 | 62 | 29491200 | ||
91557460 | Feng | E | Sept. 1, 2020, 10:45 a.m. | OK | GNU C++11 | TESTS | 36 | 62 | 76390400 | ||
91495222 | Rayment | E | Aug. 31, 2020, 1:34 p.m. | OK | GNU C++11 | TESTS | 36 | 77 | 11059200 | ||
91535622 | S-X-Y | E | Sept. 1, 2020, 4:38 a.m. | OK | GNU C++11 | TESTS | 36 | 77 | 40140800 | ||
91448174 | Pan_H | E | Aug. 31, 2020, 2:12 a.m. | OK | GNU C++11 | TESTS | 36 | 78 | 48025600 | ||
91536116 | ybweybwe | E | Sept. 1, 2020, 4:50 a.m. | OK | GNU C++11 | TESTS | 36 | 78 | 52121600 | ||
90892164 | luogu_bot4 | E | Aug. 25, 2020, 10:53 a.m. | OK | GNU C++11 | TESTS | 36 | 78 | 52633600 | ||
90839443 | Zechariah_2001 | E | Aug. 24, 2020, 3:27 p.m. | OK | GNU C++11 | TESTS | 36 | 93 | 16691200 | ||
91540840 | AutumnKite | E | Sept. 1, 2020, 6:26 a.m. | OK | GNU C++11 | TESTS | 36 | 93 | 54374400 | ||
90827508 | Emiya_Kiritsugu | E | Aug. 24, 2020, 1:02 p.m. | OK | GNU C++14 | TESTS | 36 | 140 | 11366400 | ||
90826742 | oipotato | E | Aug. 24, 2020, 12:51 p.m. | OK | GNU C++14 | TESTS | 36 | 140 | 11366400 | ||
91178341 | nautilus66 | E | Aug. 28, 2020, 4:20 a.m. | OK | GNU C++14 | TESTS | 36 | 155 | 64102400 | ||
90840158 | Cucumber_Love_Math | E | Aug. 24, 2020, 3:36 p.m. | OK | GNU C++14 | TESTS | 36 | 156 | 15257600 | ||
90840088 | Cucumber_Love_Math | E | Aug. 24, 2020, 3:35 p.m. | OK | GNU C++14 | TESTS | 36 | 156 | 15257600 | ||
91019813 | dahoon46 | E | Aug. 26, 2020, 5:34 a.m. | OK | GNU C++14 | TESTS | 36 | 156 | 36044800 | ||
90857172 | uk224 | E | Aug. 24, 2020, 8:10 p.m. | OK | GNU C++14 | TESTS | 36 | 171 | 28057600 | ||
91114202 | jinhb5518 | E | Aug. 27, 2020, 7:55 a.m. | OK | GNU C++14 | TESTS | 36 | 171 | 33484800 | ||
90837981 | Who__Cares | E | Aug. 24, 2020, 3:10 p.m. | OK | GNU C++14 | TESTS | 36 | 171 | 42598400 | ||
91523304 | megatron10599 | E | Aug. 31, 2020, 8:37 p.m. | OK | GNU C++14 | TESTS | 36 | 186 | 11161600 | ||
90883195 | vjudge6 | E | Aug. 25, 2020, 8:41 a.m. | OK | GNU C++17 | TESTS | 36 | 77 | 18432000 | ||
91500689 | lukkka | E | Aug. 31, 2020, 2:41 p.m. | OK | GNU C++17 | TESTS | 36 | 155 | 8192000 | ||
91490789 | _Clouder | E | Aug. 31, 2020, 12:38 p.m. | OK | GNU C++17 | TESTS | 36 | 155 | 22323200 | ||
90890728 | kaffuchino | E | Aug. 25, 2020, 10:32 a.m. | OK | GNU C++17 | TESTS | 36 | 171 | 7987200 | ||
91442202 | ziad_abdelkader | E | Aug. 30, 2020, 10:16 p.m. | OK | GNU C++17 | TESTS | 36 | 171 | 11878400 | ||
91346061 | bibibibi | E | Aug. 30, 2020, 1:32 p.m. | OK | GNU C++17 | TESTS | 36 | 171 | 11878400 | ||
91455075 | jass921026 | E | Aug. 31, 2020, 4:31 a.m. | OK | GNU C++17 | TESTS | 36 | 171 | 12185600 | ||
91648696 | TsReaper | E | Sept. 2, 2020, 2:20 p.m. | OK | GNU C++17 | TESTS | 36 | 171 | 13516800 | ||
91212797 | wang639026 | E | Aug. 28, 2020, 1:41 p.m. | OK | GNU C++17 | TESTS | 36 | 171 | 18432000 | ||
90845805 | ZYL | E | Aug. 24, 2020, 4:47 p.m. | OK | GNU C++17 | TESTS | 36 | 171 | 26828800 | ||
91142759 | caeious | E | Aug. 27, 2020, 2:45 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 62 | 12492800 | ||
91141500 | 11235813213455 | E | Aug. 27, 2020, 2:31 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 93 | 12492800 | ||
90912118 | kessido | E | Aug. 25, 2020, 2:40 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 109 | 16179200 | ||
91595273 | jacob.b.zhang | E | Sept. 1, 2020, 7:16 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 124 | 13721600 | ||
91054010 | boycute | E | Aug. 26, 2020, 1:05 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 124 | 32153600 | ||
90883443 | dpark3542 | E | Aug. 25, 2020, 8:45 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 140 | 17510400 | ||
91301026 | Phortox | E | Aug. 29, 2020, 5:02 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 140 | 40755200 | ||
90836218 | rockoanna | E | Aug. 24, 2020, 2:50 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 155 | 26726400 | ||
91073521 | Amiton7 | E | Aug. 26, 2020, 4:15 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 155 | 34304000 | ||
90905553 | AuqaKyz | E | Aug. 25, 2020, 2:01 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 156 | 36864000 | ||
91036341 | uwi | E | Aug. 26, 2020, 9:22 a.m. | OK | Java 11 | TESTS | 36 | 249 | 4300800 | ||
91033516 | uwi | E | Aug. 26, 2020, 8:45 a.m. | OK | Java 11 | TESTS | 36 | 280 | 4505600 | ||
91036239 | uwi | E | Aug. 26, 2020, 9:21 a.m. | OK | Java 11 | TESTS | 36 | 295 | 5017600 | ||
91032504 | uwi | E | Aug. 26, 2020, 8:32 a.m. | OK | Java 11 | TESTS | 36 | 374 | 16384000 | ||
91543839 | htvu | E | Sept. 1, 2020, 7:16 a.m. | OK | Java 11 | TESTS | 36 | 405 | 19865600 | ||
91545672 | htvu | E | Sept. 1, 2020, 7:41 a.m. | OK | Java 11 | TESTS | 36 | 452 | 43520000 | ||
91063842 | simran145 | E | Aug. 26, 2020, 2:41 p.m. | OK | Java 11 | TESTS | 36 | 1201 | 149401600 | ||
90849040 | MartyByrde | E | Aug. 24, 2020, 5:32 p.m. | OK | Java 8 | TESTS | 36 | 202 | 4710400 | ||
91440186 | lansergecs | E | Aug. 30, 2020, 9:10 p.m. | OK | Java 8 | TESTS | 36 | 374 | 52633600 | ||
91005133 | Okhair | E | Aug. 25, 2020, 10:15 p.m. | OK | Java 8 | TESTS | 36 | 420 | 12185600 | ||
91042122 | jakejase2 | E | Aug. 26, 2020, 10:44 a.m. | OK | Java 8 | TESTS | 36 | 436 | 17612800 | ||
91218316 | eng_hardik | E | Aug. 28, 2020, 2:45 p.m. | OK | Java 8 | TESTS | 36 | 436 | 37785600 | ||
91216094 | eng_hardik | E | Aug. 28, 2020, 2:15 p.m. | OK | Java 8 | TESTS | 36 | 483 | 64000000 | ||
91042337 | jakejase2 | E | Aug. 26, 2020, 10:46 a.m. | OK | Java 8 | TESTS | 36 | 529 | 33894400 | ||
91442648 | ZerooCool | E | Aug. 30, 2020, 10:32 p.m. | OK | Java 8 | TESTS | 36 | 577 | 56934400 | ||
91442393 | ZerooCool | E | Aug. 30, 2020, 10:22 p.m. | OK | Java 8 | TESTS | 36 | 592 | 65843200 | ||
91441965 | ZerooCool | E | Aug. 30, 2020, 10:06 p.m. | OK | Java 8 | TESTS | 36 | 592 | 100761600 | ||
91221716 | MiuraMiuMiu | E | Aug. 28, 2020, 3:20 p.m. | OK | Mono C# | TESTS | 36 | 607 | 29900800 | ||
90831288 | _Ani | E | Aug. 24, 2020, 1:50 p.m. | OK | MS C++ 2017 | TESTS | 36 | 483 | 11161600 | ||
91065631 | masterwater | E | Aug. 26, 2020, 2:58 p.m. | OK | MS C++ 2017 | TESTS | 36 | 638 | 192409600 | ||
91265336 | codershuvo | E | Aug. 29, 2020, 7:39 a.m. | OK | PyPy 3 | TESTS | 36 | 889 | 27443200 | ||
91339092 | DeepBorys | E | Aug. 30, 2020, 11:46 a.m. | OK | PyPy 3 | TESTS | 36 | 1653 | 57344000 | ||
91011619 | Chipe1 | E | Aug. 26, 2020, 2:46 a.m. | OK | Rust | TESTS | 36 | 218 | 18432000 |
Back to search problems