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 |
---|---|---|---|---|---|---|
1278 | Educational Codeforces Round 78 (Rated for Div. 2) | FINISHED | False | 7200 | 155057099 | Dec. 19, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4047 ) | D | Segment Tree | PROGRAMMING | data structures ds graphs trees | 2100 |
B'As the name of the task implies, you are asked to do some work with segments and trees. Recall that a tree is a connected undirected graph such that there is exactly one simple path between every pair of its vertices. You are given n segments [l_1, r_1], [l_2, r_2], ... , [l_n, r_n] , l_i < r_i for every i . It is guaranteed that all segments ' endpoints are integers, and all endpoints are unique -- there is no pair of segments such that they start in the same point, end in the same point or one starts in the same point the other one ends. Let 's generate a graph with n vertices from these segments. Vertices v and u are connected by an edge if and only if segments [l_v, r_v] and [l_u, r_u] intersect and neither of it lies fully inside the other one. For example, pairs ([1, 3], [2, 4]) and ([5, 10], [3, 7]) will induce the edges but pairs ([1, 2], [3, 4]) and ([5, 7], [3, 10]) will not. Determine if the resulting graph is a tree or not. The first line contains a single integer n ( 1 <= n <= 5 cdot 10^5 ) -- the number of segments. The i -th of the next n lines contain the description of the i -th segment -- two integers l_i and r_i ( 1 <= l_i < r_i <= 2n ). It is guaranteed that all segments borders are pairwise distinct. Print "YES" if the resulting graph is a tree and "NO" otherwise. The graph corresponding to the first example: The graph corresponding to the second example: The graph corresponding to the third example: '... |
Educational Codeforces Round 78 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
67237836 | rainboy | D | Dec. 19, 2019, 4:16 p.m. | OK | GNU C11 | TESTS | 118 | 343 | 16076800 | 2100 | |
67264033 | OBJECT.907 | D | Dec. 20, 2019, 5:15 a.m. | OK | GNU C++11 | TESTS | 118 | 171 | 22118400 | 2100 | |
67238030 | yinghua1314 | D | Dec. 19, 2019, 4:16 p.m. | OK | GNU C++11 | TESTS | 118 | 171 | 33177600 | 2100 | |
67278674 | AyoAyowei | D | Dec. 20, 2019, 12:24 p.m. | OK | GNU C++11 | TESTS | 118 | 171 | 36147200 | 2100 | |
67650981 | tuihuademing2 | D | Dec. 26, 2019, 12:07 p.m. | OK | GNU C++11 | TESTS | 118 | 171 | 52326400 | 2100 | |
67263982 | OBJECT.907 | D | Dec. 20, 2019, 5:13 a.m. | OK | GNU C++11 | TESTS | 118 | 187 | 22118400 | 2100 | |
67228884 | Coming | D | Dec. 19, 2019, 3:36 p.m. | OK | GNU C++11 | TESTS | 118 | 202 | 20070400 | 2100 | |
67240275 | lzoi.win | D | Dec. 19, 2019, 4:26 p.m. | OK | GNU C++11 | TESTS | 118 | 202 | 33996800 | 2100 | |
67223817 | A_Fan_of_the_AK_King--lk | D | Dec. 19, 2019, 3:16 p.m. | OK | GNU C++11 | TESTS | 118 | 218 | 23244800 | 2100 | |
67406998 | Contna | D | Dec. 22, 2019, 6:48 a.m. | OK | GNU C++11 | TESTS | 118 | 233 | 24064000 | 2100 | |
67231048 | Marca | D | Dec. 19, 2019, 3:45 p.m. | OK | GNU C++11 | TESTS | 118 | 234 | 22937600 | 2100 | |
68594989 | tokitsukaze | D | Jan. 11, 2020, 1:46 p.m. | OK | GNU C++14 | TESTS | 118 | 218 | 28569600 | 2100 | |
67313873 | Ice_Cream | D | Dec. 21, 2019, 4:53 a.m. | OK | GNU C++14 | TESTS | 118 | 233 | 15360000 | 2100 | |
67314111 | Ice_Cream | D | Dec. 21, 2019, 5:01 a.m. | OK | GNU C++14 | TESTS | 118 | 233 | 15360000 | 2100 | |
67241117 | compute | D | Dec. 19, 2019, 4:30 p.m. | OK | GNU C++14 | TESTS | 118 | 233 | 36044800 | 2100 | |
67313812 | Ice_Cream | D | Dec. 21, 2019, 4:51 a.m. | OK | GNU C++14 | TESTS | 118 | 234 | 15360000 | 2100 | |
67313743 | Ice_Cream | D | Dec. 21, 2019, 4:49 a.m. | OK | GNU C++14 | TESTS | 118 | 249 | 15360000 | 2100 | |
67313777 | Ice_Cream | D | Dec. 21, 2019, 4:50 a.m. | OK | GNU C++14 | TESTS | 118 | 249 | 15360000 | 2100 | |
67287343 | fxcvgv | D | Dec. 20, 2019, 2:38 p.m. | OK | GNU C++14 | TESTS | 118 | 280 | 26214400 | 2100 | |
67261136 | iefnah06 | D | Dec. 20, 2019, 3:33 a.m. | OK | GNU C++14 | TESTS | 118 | 280 | 31948800 | 2100 | |
69390240 | low_ | D | Jan. 23, 2020, 3:04 a.m. | OK | GNU C++14 | TESTS | 118 | 311 | 73318400 | 2100 | |
67260916 | interestingLSY | D | Dec. 20, 2019, 3:23 a.m. | OK | GNU C++17 | TESTS | 118 | 202 | 36659200 | 2100 | |
67227114 | Um_nik | D | Dec. 19, 2019, 3:29 p.m. | OK | GNU C++17 | TESTS | 118 | 249 | 10035200 | 2100 | |
67258882 | vinhntndu | D | Dec. 20, 2019, 1:36 a.m. | OK | GNU C++17 | TESTS | 118 | 249 | 20070400 | 2100 | |
67274967 | eopXD | D | Dec. 20, 2019, 9:50 a.m. | OK | GNU C++17 | TESTS | 118 | 249 | 24166400 | 2100 | |
67258772 | vinhntndu | D | Dec. 20, 2019, 1:31 a.m. | OK | GNU C++17 | TESTS | 118 | 249 | 34201600 | 2100 | |
67259162 | vinhntndu | D | Dec. 20, 2019, 1:52 a.m. | OK | GNU C++17 | TESTS | 118 | 265 | 23244800 | 2100 | |
67676586 | Funny_digit | D | Dec. 27, 2019, 2:36 a.m. | OK | GNU C++17 | TESTS | 118 | 265 | 26214400 | 2100 | |
67246277 | m.hasan01 | D | Dec. 19, 2019, 5:21 p.m. | OK | GNU C++17 | TESTS | 118 | 280 | 10035200 | 2100 | |
67258958 | vinhntndu | D | Dec. 20, 2019, 1:42 a.m. | OK | GNU C++17 | TESTS | 118 | 280 | 20275200 | 2100 | |
67227452 | tsyr8924503 | D | Dec. 19, 2019, 3:30 p.m. | OK | GNU C++17 | TESTS | 118 | 280 | 20275200 | 2100 | |
67232524 | u1s1reallycai | D | Dec. 19, 2019, 3:51 p.m. | OK | Go | TESTS | 118 | 826 | 49152000 | 2100 | |
67278029 | Anonymous | D | Dec. 20, 2019, 10:57 a.m. | OK | Java 11 | TESTS | 118 | 1185 | 181248000 | 2100 | |
67298200 | its_aks_ulure | D | Dec. 20, 2019, 5:39 p.m. | OK | Java 11 | TESTS | 118 | 1232 | 112947200 | 2100 | |
67228386 | Musin | D | Dec. 19, 2019, 3:34 p.m. | OK | Java 11 | TESTS | 118 | 1403 | 139673600 | 2100 | |
67249912 | lightseba | D | Dec. 19, 2019, 6:38 p.m. | OK | Java 11 | TESTS | 118 | 1543 | 99123200 | 2100 | |
67252299 | IslamTalipovTop | D | Dec. 19, 2019, 7:43 p.m. | OK | Java 11 | TESTS | 118 | 1559 | 130764800 | 2100 | |
67251531 | IslamTalipovTop | D | Dec. 19, 2019, 7:21 p.m. | OK | Java 11 | TESTS | 118 | 1591 | 130764800 | 2100 | |
67251739 | Dukkha | D | Dec. 19, 2019, 7:27 p.m. | OK | Java 11 | TESTS | 118 | 1684 | 21811200 | 2100 | |
67273026 | thisbeit | D | Dec. 20, 2019, 9:05 a.m. | OK | Java 8 | TESTS | 118 | 530 | 41574400 | 2100 | |
67248760 | prem_cse | D | Dec. 19, 2019, 6:12 p.m. | OK | Java 8 | TESTS | 118 | 545 | 33382400 | 2100 | |
67254065 | sushant_verma | D | Dec. 19, 2019, 8:41 p.m. | OK | Java 8 | TESTS | 118 | 592 | 33177600 | 2100 | |
67234280 | Baelish | D | Dec. 19, 2019, 3:59 p.m. | OK | Java 8 | TESTS | 118 | 639 | 94412800 | 2100 | |
67245351 | nikolay.v.mikhaylov | D | Dec. 19, 2019, 5:06 p.m. | OK | Java 8 | TESTS | 118 | 670 | 43929600 | 2100 | |
67258111 | Xylenox | D | Dec. 20, 2019, 12:49 a.m. | OK | Java 8 | TESTS | 118 | 686 | 26726400 | 2100 | |
67297304 | ZeyadKhattab | D | Dec. 20, 2019, 5:22 p.m. | OK | Java 8 | TESTS | 118 | 795 | 24678400 | 2100 | |
68123375 | chojh1222 | D | Jan. 3, 2020, 2:12 p.m. | OK | Java 8 | TESTS | 118 | 810 | 104038400 | 2100 | |
67766777 | bluesky111 | D | Dec. 28, 2019, 4:30 a.m. | OK | Java 8 | TESTS | 118 | 873 | 73830400 | 2100 | |
67565865 | adarsh000321 | D | Dec. 24, 2019, 7:16 p.m. | OK | Java 8 | TESTS | 118 | 935 | 30208000 | 2100 | |
67262571 | Spheniscine | D | Dec. 20, 2019, 4:24 a.m. | OK | Kotlin | TESTS | 118 | 1060 | 54579200 | 2100 | |
67262547 | Spheniscine | D | Dec. 20, 2019, 4:23 a.m. | OK | Kotlin | TESTS | 118 | 1091 | 54579200 | 2100 | |
67280416 | Spheniscine | D | Dec. 20, 2019, 12:56 p.m. | OK | Kotlin | TESTS | 118 | 1154 | 54579200 | 2100 | |
67326610 | robin646087 | D | Dec. 21, 2019, 9:59 a.m. | OK | Kotlin | TESTS | 118 | 1278 | 66252800 | 2100 | |
67635526 | MagentaCobra | D | Dec. 26, 2019, 6:43 a.m. | OK | Kotlin | TESTS | 118 | 1294 | 66252800 | 2100 | |
67229945 | elizarov | D | Dec. 19, 2019, 3:41 p.m. | OK | Kotlin | TESTS | 118 | 1325 | 66252800 | 2100 | |
67769982 | Tlatoani | D | Dec. 28, 2019, 6:20 a.m. | OK | Kotlin | TESTS | 118 | 1653 | 261120000 | 2100 | |
67257756 | hibatibati | D | Dec. 20, 2019, 12:24 a.m. | OK | Mono C# | TESTS | 118 | 826 | 33587200 | 2100 | |
67244900 | Yupiteru | D | Dec. 19, 2019, 5 p.m. | OK | Mono C# | TESTS | 118 | 1684 | 195686400 | 2100 | |
67260157 | camypaper | D | Dec. 20, 2019, 2:47 a.m. | OK | Mono C# | TESTS | 118 | 1981 | 98406400 | 2100 | |
67243301 | Yupiteru | D | Dec. 19, 2019, 4:43 p.m. | OK | Mono C# | TESTS | 118 | 1981 | 241356800 | 2100 | |
67237994 | r57shell | D | Dec. 19, 2019, 4:16 p.m. | OK | MS C++ | TESTS | 118 | 312 | 16793600 | 2100 | |
67240324 | tarattata1 | D | Dec. 19, 2019, 4:26 p.m. | OK | MS C++ | TESTS | 118 | 452 | 36761600 | 2100 | |
67230896 | pichulia | D | Dec. 19, 2019, 3:44 p.m. | OK | MS C++ 2017 | TESTS | 118 | 451 | 48332800 | 2100 | |
67309441 | youx | D | Dec. 21, 2019, 1:12 a.m. | OK | MS C++ 2017 | TESTS | 118 | 561 | 44339200 | 2100 | |
67468468 | CrashMaster | D | Dec. 23, 2019, 11:56 a.m. | OK | MS C++ 2017 | TESTS | 118 | 576 | 50380800 | 2100 | |
67323396 | Hapsidra | D | Dec. 21, 2019, 8:52 a.m. | OK | MS C++ 2017 | TESTS | 118 | 639 | 50892800 | 2100 | |
67323147 | Hapsidra | D | Dec. 21, 2019, 8:46 a.m. | OK | MS C++ 2017 | TESTS | 118 | 733 | 46899200 | 2100 | |
67248157 | dkyun | D | Dec. 19, 2019, 5:59 p.m. | OK | MS C++ 2017 | TESTS | 118 | 873 | 136704000 | 2100 | |
67283783 | SendThemToHell | D | Dec. 20, 2019, 1:46 p.m. | OK | MS C++ 2017 | TESTS | 118 | 935 | 24166400 | 2100 | |
68009512 | beemax | D | Dec. 31, 2019, 2:59 p.m. | OK | MS C++ 2017 | TESTS | 118 | 935 | 42086400 | 2100 | |
67264717 | Sem_1337 | D | Dec. 20, 2019, 5:35 a.m. | OK | MS C++ 2017 | TESTS | 118 | 1060 | 44441600 | 2100 | |
69545072 | itytwt | D | Jan. 26, 2020, 1:39 a.m. | OK | MS C++ 2017 | TESTS | 118 | 1060 | 55808000 | 2100 | |
67258202 | vinhntndu | D | Dec. 20, 2019, 12:56 a.m. | OK | PyPy 2 | TESTS | 118 | 1029 | 85913600 | 2100 | |
67230679 | pajenegod | D | Dec. 19, 2019, 3:44 p.m. | OK | PyPy 2 | TESTS | 118 | 1091 | 85606400 | 2100 | |
67462374 | MVP | D | Dec. 23, 2019, 9:42 a.m. | OK | PyPy 2 | TESTS | 118 | 1341 | 96563200 | 2100 | |
67462438 | MVP | D | Dec. 23, 2019, 9:43 a.m. | OK | PyPy 2 | TESTS | 118 | 1388 | 99532800 | 2100 | |
67462275 | MVP | D | Dec. 23, 2019, 9:39 a.m. | OK | PyPy 2 | TESTS | 118 | 1388 | 103219200 | 2100 | |
67462411 | MVP | D | Dec. 23, 2019, 9:43 a.m. | OK | PyPy 2 | TESTS | 118 | 1434 | 99225600 | 2100 | |
67235537 | cftt | D | Dec. 19, 2019, 4:05 p.m. | OK | PyPy 3 | TESTS | 118 | 1216 | 27136000 | 2100 | |
68338640 | mitribunskiy | D | Jan. 7, 2020, 1:08 a.m. | OK | PyPy 3 | TESTS | 118 | 1403 | 77312000 | 2100 | |
68338504 | mitribunskiy | D | Jan. 7, 2020, 12:59 a.m. | OK | PyPy 3 | TESTS | 118 | 1404 | 76800000 | 2100 | |
67264424 | Coki628 | D | Dec. 20, 2019, 5:27 a.m. | OK | PyPy 3 | TESTS | 118 | 1419 | 53350400 | 2100 | |
68482754 | deadguy | D | Jan. 10, 2020, 8:27 a.m. | OK | PyPy 3 | TESTS | 118 | 1435 | 53248000 | 2100 | |
68338378 | mitribunskiy | D | Jan. 7, 2020, 12:50 a.m. | OK | PyPy 3 | TESTS | 118 | 1435 | 76902400 | 2100 | |
68330088 | mitribunskiy | D | Jan. 6, 2020, 6:24 p.m. | OK | PyPy 3 | TESTS | 118 | 1996 | 69734400 | 2100 | |
67403519 | akiradeveloper | D | Dec. 22, 2019, 5:18 a.m. | OK | Rust | TESTS | 118 | 280 | 31334400 | 2100 | |
67255293 | sansen | D | Dec. 19, 2019, 9:35 p.m. | OK | Rust | TESTS | 118 | 296 | 42905600 | 2100 |
Back to search problems