Codeforces Round 506 (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
1029 Codeforces Round 506 (Div. 3) FINISHED False 7200 196700999 Aug. 24, 2018, 2:50 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7589 ) C Maximal Intersection PROGRAMMING greedy math sortings 1600

B"You are given n segments on a number line; each endpoint of every segment has integer coordinates. Some segments can degenerate to points. Segments can intersect with each other, be nested in each other or even coincide. The intersection of a sequence of segments is such a maximal set of points (not necesserily having integer coordinates) that each point lies within every segment from the sequence. If the resulting set isn't empty, then it always forms some continuous segment. The length of the intersection is the length of the resulting segment or 0 in case the intersection is an empty set. For example, the intersection of segments [1;5] and [3;10] is [3;5] (length 2 ), the intersection of segments [1;5] and [5;7] is [5;5] (length 0 ) and the intersection of segments [1;5] and [6;6] is an empty set (length 0 ). Your task is to remove exactly one segment from the given sequence in such a way that the intersection of the remaining (n - 1) segments has the maximal possible length. The first line contains a single integer n ( 2 <= n <= 3 cdot 10^5 ) -- the number of segments in the sequence. Each of the next n lines contains two integers l_i and r_i ( 0 <= l_i <= r_i <= 10^9 ) -- the description of the i -th segment. Print a single integer -- the maximal possible length of the intersection of (n - 1) remaining segments after you remove exactly one segment from the sequence. In the first example you should remove the segment [3;3] , the intersection will become [2;3] (length 1 ). Removing any other segment will result in the intersection [3;3] (length 0 ). In the second example you should remove the segment [1;3] or segment [2;6] , the intersection will become [2;4] (length 2 ) or [1;3] (length 2 ), respectively. Removing any other segment will result in the intersection"...

Tutorials

Codeforces Round #506 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50405569 vjudge5 C Feb. 23, 2019, 8:31 p.m. OK Clang++17 Diagnostics TESTS 71 249 7680000 1600
42111784 gaoqiong C Aug. 26, 2018, 6:38 a.m. OK Clang++17 Diagnostics TESTS 71 748 6144000 1600
42761190 vjudge5 C Sept. 11, 2018, 10:42 a.m. OK Clang++17 Diagnostics TESTS 71 1091 1536000 1600
46629120 Matematikoi C Dec. 5, 2018, 12:50 a.m. OK Clang++17 Diagnostics TESTS 71 2854 8499200 1600
44762264 vjudge1 C Oct. 24, 2018, 7:51 a.m. OK FPC TESTS 71 155 7987200 1600
44684783 luogu_bot1 C Oct. 22, 2018, 8:48 a.m. OK FPC TESTS 71 170 2457600 1600
44684677 vjudge1 C Oct. 22, 2018, 8:45 a.m. OK FPC TESTS 71 170 2457600 1600
44761843 vjudge3 C Oct. 24, 2018, 7:37 a.m. OK FPC TESTS 71 171 2457600 1600
44735056 vjudge4 C Oct. 23, 2018, 12:28 p.m. OK FPC TESTS 71 171 2457600 1600
44762222 luogu_bot1 C Oct. 24, 2018, 7:49 a.m. OK FPC TESTS 71 171 7987200 1600
67685723 chaorenhaha C Dec. 27, 2019, 8:48 a.m. OK FPC TESTS 71 171 11980800 1600
44734833 vjudge4 C Oct. 23, 2018, 12:23 p.m. OK FPC TESTS 71 202 12083200 1600
42350734 DPO_WS C Sept. 2, 2018, 4:57 a.m. OK FPC TESTS 71 265 9728000 1600
42215085 freyes C Aug. 28, 2018, 4:39 p.m. OK GNU C TESTS 71 124 2355200 1600
42353050 Scut82 C Sept. 2, 2018, 6:51 a.m. OK GNU C++ TESTS 71 46 2457600 1600
42278214 luogu_bot4 C Aug. 30, 2018, 12:49 p.m. OK GNU C++ TESTS 71 46 3174400 1600
42353515 Scut82 C Sept. 2, 2018, 7:10 a.m. OK GNU C++ TESTS 71 46 7270400 1600
42110974 Even_Bao C Aug. 26, 2018, 5:59 a.m. OK GNU C++ TESTS 71 46 7270400 1600
42108185 zhtzht C Aug. 26, 2018, 3:19 a.m. OK GNU C++ TESTS 71 46 7270400 1600
42195914 Rajib_119 C Aug. 28, 2018, 6:22 a.m. OK GNU C++ TESTS 71 46 14438400 1600
42306502 luojinyao C Aug. 31, 2018, 11:39 a.m. OK GNU C++ TESTS 71 61 16076800 1600
42352989 Scut82 C Sept. 2, 2018, 6:48 a.m. OK GNU C++ TESTS 71 62 4915200 1600
42229502 GCCCCCCC C Aug. 29, 2018, 5:43 a.m. OK GNU C++ TESTS 71 62 6451200 1600
42306511 luogu_bot4 C Aug. 31, 2018, 11:39 a.m. OK GNU C++ TESTS 71 62 16076800 1600
43229222 ypLiu C Sept. 22, 2018, 12:04 a.m. OK GNU C11 TESTS 71 124 0 1600
42844844 LukeSD98 C Sept. 13, 2018, 10:13 p.m. OK GNU C11 TESTS 71 124 2355200 1600
42679154 falcon_9 C Sept. 8, 2018, 3:21 p.m. OK GNU C11 TESTS 71 124 9932800 1600
54553280 geckods C May 24, 2019, 10:20 a.m. OK GNU C11 TESTS 71 139 0 1600
60838309 luogu_bot5 C Sept. 19, 2019, 9:55 a.m. OK GNU C++11 TESTS 71 31 7270400 1600
63390812 Kylin_ C Oct. 25, 2019, 3:10 p.m. OK GNU C++11 TESTS 71 31 28057600 1600
42307233 zhenGG C Aug. 31, 2018, 12:05 p.m. OK GNU C++11 TESTS 71 46 2457600 1600
42455425 luogu_bot2 C Sept. 4, 2018, 11:08 a.m. OK GNU C++11 TESTS 71 46 2764800 1600
42455393 Longshenhadisi C Sept. 4, 2018, 11:07 a.m. OK GNU C++11 TESTS 71 46 2764800 1600
65436403 910306264 C Nov. 20, 2019, 1:31 p.m. OK GNU C++11 TESTS 71 46 3481600 1600
66011712 luogu_bot4 C Nov. 30, 2019, 2:58 a.m. OK GNU C++11 TESTS 71 46 3481600 1600
58171731 Frame233 C Aug. 2, 2019, 11:36 a.m. OK GNU C++11 TESTS 71 46 7270400 1600
60838322 robin12138 C Sept. 19, 2019, 9:55 a.m. OK GNU C++11 TESTS 71 46 7270400 1600
64624658 luogu_bot3 C Nov. 10, 2019, 8:09 a.m. OK GNU C++11 TESTS 71 46 7270400 1600
43418805 brambles_sea C Sept. 25, 2018, 4:44 p.m. OK GNU C++14 TESTS 71 31 67481600 1600
47795305 gfonn C Dec. 31, 2018, 4:27 p.m. OK GNU C++14 TESTS 71 109 2355200 1600
47795282 gfonn C Dec. 31, 2018, 4:26 p.m. OK GNU C++14 TESTS 71 109 2355200 1600
42428435 iaNTU C Sept. 3, 2018, 1:45 p.m. OK GNU C++14 TESTS 71 109 2355200 1600
62974352 Mynesis C Oct. 20, 2019, 8:03 a.m. OK GNU C++14 TESTS 71 109 2457600 1600
52489115 bbssgg11 C April 8, 2019, 10:48 a.m. OK GNU C++14 TESTS 71 124 2457600 1600
48442314 ytrsk C Jan. 16, 2019, 4:58 a.m. OK GNU C++14 TESTS 71 124 2457600 1600
43444102 zookhee C Sept. 26, 2018, 10:34 a.m. OK GNU C++14 TESTS 71 124 7168000 1600
42299447 rdas6313 C Aug. 31, 2018, 6:34 a.m. OK GNU C++14 TESTS 71 124 7168000 1600
50231278 ngw C Feb. 20, 2019, 9:03 a.m. OK GNU C++14 TESTS 71 124 7168000 1600
64753215 i_lower C Nov. 12, 2019, 3:59 p.m. OK GNU C++17 TESTS 71 124 2355200 1600
42335666 asminimulin C Sept. 1, 2018, 1:45 p.m. OK GNU C++17 TESTS 71 124 7372800 1600
52024739 nowyyz C March 30, 2019, 2:19 p.m. OK GNU C++17 TESTS 71 139 0 1600
52952529 vjudge1 C April 18, 2019, 12:29 p.m. OK GNU C++17 TESTS 71 139 4812800 1600
67456757 yuanyuan2048 C Dec. 23, 2019, 7:15 a.m. OK GNU C++17 TESTS 71 139 5017600 1600
50100619 _Your_mum_ C Feb. 18, 2019, 2:44 p.m. OK GNU C++17 TESTS 71 139 7270400 1600
45961747 STZG C Nov. 19, 2018, 11:59 a.m. OK GNU C++17 TESTS 71 139 7475200 1600
52257125 vjudge5 C April 3, 2019, 6:31 a.m. OK GNU C++17 TESTS 71 139 7987200 1600
52267144 vjudge4 C April 3, 2019, 11:47 a.m. OK GNU C++17 TESTS 71 139 16076800 1600
57840763 vjudge4 C July 27, 2019, 9:13 a.m. OK GNU C++17 TESTS 71 140 0 1600
42471684 Marii C Sept. 4, 2018, 6:47 p.m. OK Go TESTS 71 701 10649600 1600
64620241 ashanksingh1997 C Nov. 10, 2019, 6:35 a.m. OK Java 11 TESTS 71 982 0 1600
47180136 wery0 C Dec. 17, 2018, 8:05 p.m. OK Java 8 TESTS 71 124 2150400 1600
69575315 johnny16 C Jan. 26, 2020, 3:22 p.m. OK Java 8 TESTS 71 140 2150400 1600
51230146 rishz C March 12, 2019, 3:50 p.m. OK Java 8 TESTS 71 155 2150400 1600
42105866 tramplingBrain C Aug. 26, 2018, 12:25 a.m. OK Java 8 TESTS 71 155 2355200 1600
42215137 Aniket144 C Aug. 28, 2018, 4:40 p.m. OK Java 8 TESTS 71 171 2150400 1600
42315804 Itwazonce C Aug. 31, 2018, 5:19 p.m. OK Java 8 TESTS 71 202 4915200 1600
42297833 kumarmonu0522 C Aug. 31, 2018, 5:14 a.m. OK Java 8 TESTS 71 218 0 1600
42102240 mandark27 C Aug. 25, 2018, 8:13 p.m. OK Java 8 TESTS 71 233 8089600 1600
66252227 bluesky111 C Dec. 4, 2019, 3:01 a.m. OK Java 8 TESTS 71 233 26828800 1600
44159170 unicorn20141 C Oct. 11, 2018, 8:11 p.m. OK Java 8 TESTS 71 264 2252800 1600
67375811 mirjalol.bahodirov C Dec. 21, 2019, 3:02 p.m. OK Kotlin TESTS 71 810 43417600 1600
43353932 stepanovep C Sept. 24, 2018, 4:52 a.m. OK Kotlin TESTS 71 1013 24166400 1600
67391410 madina_s123 C Dec. 21, 2019, 7:57 p.m. OK Kotlin TESTS 71 1028 9932800 1600
67375820 madina_s123 C Dec. 21, 2019, 3:02 p.m. OK Kotlin TESTS 71 1060 9728000 1600
56478696 og.kostya C July 3, 2019, 2:56 p.m. OK Mono C# TESTS 71 93 2355200 1600
42104061 TrinidadTobago C Aug. 25, 2018, 9:53 p.m. OK Mono C# TESTS 71 264 8499200 1600
42113292 Skndr801 C Aug. 26, 2018, 7:49 a.m. OK Mono C# TESTS 71 295 71680000 1600
57088711 PavlovIvan C July 15, 2019, 9:53 a.m. OK Mono C# TESTS 71 296 18022400 1600
42150794 Strelokask C Aug. 27, 2018, 12:04 p.m. OK Mono C# TESTS 71 374 15564800 1600
42359297 keep.deep C Sept. 2, 2018, 10:50 a.m. OK Mono C# TESTS 71 390 14233600 1600
42122652 Evgenii_Stepanov C Aug. 26, 2018, 1:18 p.m. OK Mono C# TESTS 71 405 14540800 1600
50602082 isslow C Feb. 28, 2019, 1:08 p.m. OK Mono C# TESTS 71 514 10240000 1600
42436747 GustavK C Sept. 3, 2018, 5:48 p.m. OK Mono C# TESTS 71 639 34816000 1600
42325893 krazyduck C Sept. 1, 2018, 5:22 a.m. OK Mono C# TESTS 71 686 33689600 1600
57849625 vjudge1 C July 27, 2019, 12:36 p.m. OK MS C++ TESTS 71 93 0 1600
44821259 vjudge2 C Oct. 25, 2018, 2:35 a.m. OK MS C++ TESTS 71 93 0 1600
49989453 vjudge5 C Feb. 16, 2019, 12:06 p.m. OK MS C++ TESTS 71 93 2457600 1600
66012021 spriderHero2008 C Nov. 30, 2019, 3:09 a.m. OK MS C++ TESTS 71 93 7168000 1600
55957438 vjudge2 C June 23, 2019, 7:52 a.m. OK MS C++ TESTS 71 108 4812800 1600
66012283 spriderHero2008 C Nov. 30, 2019, 3:19 a.m. OK MS C++ TESTS 71 108 7168000 1600
53992556 vjudge2 C May 11, 2019, 12:57 p.m. OK MS C++ TESTS 71 108 7270400 1600
66011372 spriderHero2008 C Nov. 30, 2019, 2:44 a.m. OK MS C++ TESTS 71 108 7270400 1600
51747815 vjudge4 C March 23, 2019, 8:19 a.m. OK MS C++ TESTS 71 108 7270400 1600
57849959 vjudge2 C July 27, 2019, 12:44 p.m. OK MS C++ TESTS 71 109 0 1600
51984585 sohailk1999 C March 29, 2019, 5:55 p.m. OK MS C++ 2017 TESTS 71 576 7270400 1600
51863480 ldm0magician C March 26, 2019, 2:08 p.m. OK MS C++ 2017 TESTS 71 608 2457600 1600
58381044 yorky C Aug. 6, 2019, 10 a.m. OK MS C++ 2017 TESTS 71 639 23961600 1600
61258236 vjudge3 C Sept. 25, 2019, 10:51 a.m. OK MS C++ 2017 TESTS 71 717 16896000 1600
53959911 shoulinniao C May 10, 2019, 1:36 p.m. OK MS C++ 2017 TESTS 71 1092 21708800 1600
57936759 Still_Theory C July 29, 2019, 11:05 a.m. OK MS C++ 2017 TESTS 71 1450 24576000 1600
66826795 Emperor_Nazer C Dec. 14, 2019, 9:13 a.m. OK MS C++ 2017 TESTS 71 1996 33792000 1600
66632896 zhannan C Dec. 11, 2019, 11:51 a.m. OK MS C++ 2017 TESTS 71 2167 33792000 1600
49627911 vjudge2 C Feb. 8, 2019, 12:54 p.m. OK Node.js TESTS 71 1247 60211200 1600
45794792 KGYYT C Nov. 16, 2018, 9:49 a.m. OK PascalABC.NET TESTS 71 467 5222400 1600
42362059 OpKos C Sept. 2, 2018, 12:26 p.m. OK PascalABC.NET TESTS 71 546 5324800 1600
46547981 c1729 C Dec. 3, 2018, 4:16 p.m. OK PyPy 2 TESTS 71 390 27955200 1600
54570709 Mukundan314 C May 24, 2019, 7:06 p.m. OK PyPy 2 TESTS 71 483 45670400 1600
45605253 noob77777 C Nov. 12, 2018, 3 p.m. OK PyPy 2 TESTS 71 780 11468800 1600
42147118 sasasagagaga C Aug. 27, 2018, 9:33 a.m. OK PyPy 2 TESTS 71 1122 40243200 1600
42869839 nealzane C Sept. 14, 2018, 6:07 p.m. OK PyPy 2 TESTS 71 1497 17920000 1600
43651451 soumyasarkar1998 C Oct. 1, 2018, 3:55 p.m. OK PyPy 2 TESTS 71 1622 32870400 1600
53495326 yfo C April 29, 2019, 11:27 a.m. OK PyPy 3 TESTS 71 608 10547200 1600
50528482 nethish C Feb. 26, 2019, 12:44 p.m. OK PyPy 3 TESTS 71 748 69427200 1600
42186975 LordVader C Aug. 27, 2018, 10:15 p.m. OK PyPy 3 TESTS 71 810 10854400 1600
57587818 Kadtsin_vs C July 23, 2019, 11:18 a.m. OK PyPy 3 TESTS 71 1668 45977600 1600
42102280 kbelyaev C Aug. 25, 2018, 8:15 p.m. OK PyPy 3 TESTS 71 2215 9728000 1600
42230462 shanzei C Aug. 29, 2018, 6:21 a.m. OK PyPy 3 TESTS 71 2324 10444800 1600
42147157 sasasagagaga C Aug. 27, 2018, 9:34 a.m. OK PyPy 3 TESTS 71 2495 51404800 1600
48103069 TurningTables C Jan. 8, 2019, 11:58 p.m. OK PyPy 3 TESTS 71 2511 25395200 1600
45308441 mug C Nov. 5, 2018, 12:30 a.m. OK PyPy 3 TESTS 71 2526 37376000 1600
42147176 sasasagagaga C Aug. 27, 2018, 9:35 a.m. OK PyPy 3 TESTS 71 2542 51302400 1600
42267559 morejarphone C Aug. 30, 2018, 6:09 a.m. OK Python 2 TESTS 71 1154 26624000 1600
42491979 LuckMing C Sept. 5, 2018, 12:33 p.m. OK Python 2 TESTS 71 1559 21504000 1600
45600850 noob77777 C Nov. 12, 2018, 2:50 p.m. OK Python 2 TESTS 71 1731 23040000 1600
42616597 thuglife69 C Sept. 7, 2018, 2:01 p.m. OK Python 2 TESTS 71 2230 38912000 1600
48763489 ssk497 C Jan. 22, 2019, 6:22 p.m. OK Python 2 TESTS 71 2417 34201600 1600
42236261 orailly C Aug. 29, 2018, 9:51 a.m. OK Python 3 TESTS 71 717 30617600 1600
46284331 petushny C Nov. 27, 2018, 3:09 p.m. OK Python 3 TESTS 71 811 0 1600
66019563 vjudge5 C Nov. 30, 2019, 6:51 a.m. OK Python 3 TESTS 71 826 307200 1600
66019495 luogu_bot4 C Nov. 30, 2019, 6:49 a.m. OK Python 3 TESTS 71 826 307200 1600
66019518 luogu_bot4 C Nov. 30, 2019, 6:50 a.m. OK Python 3 TESTS 71 841 307200 1600
66018133 luogu_bot4 C Nov. 30, 2019, 6:18 a.m. OK Python 3 TESTS 71 841 307200 1600
56420875 tushartyagi8750 C July 2, 2019, 7:15 a.m. OK Python 3 TESTS 71 873 19660800 1600
42154133 ahmed_tawfikk C Aug. 27, 2018, 1:44 p.m. OK Python 3 TESTS 71 966 307200 1600
42147589 Mk_Python_v1 C Aug. 27, 2018, 9:53 a.m. OK Python 3 TESTS 71 967 0 1600
43445797 Vasiliy_48 C Sept. 26, 2018, 11:20 a.m. OK Python 3 TESTS 71 1029 0 1600
42158084 purple_haze1 C Aug. 27, 2018, 4:08 p.m. OK Ruby TESTS 71 1964 52428800 1600
42157928 purple_haze1 C Aug. 27, 2018, 4:02 p.m. OK Ruby TESTS 71 2791 52428800 1600
42450021 Letmecry C Sept. 4, 2018, 7:18 a.m. OK Rust TESTS 71 639 7475200 1600
42451553 Letmecry C Sept. 4, 2018, 8:27 a.m. OK Rust TESTS 71 655 0 1600
42259431 dandersonw C Aug. 30, 2018, 1:35 a.m. OK Scala TESTS 71 1372 3891200 1600
42127893 amirrr C Aug. 26, 2018, 4:27 p.m. OK Scala TESTS 71 1387 20377600 1600

remove filters

Back to search problems