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.
Problems
B"You are given n segments [l_1, r_1], [l_2, r_2], ... , [l_n, r_n] . Each segment has one of two colors: the i -th segment's color is t_i . Let's call a pair of segments i and j bad if the following two conditions are met: Calculate the maximum number of segments that can be selected from the given ones, so that there is no bad pair among the selected ones. The first line contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- number of segments. The next n lines contains three integers l_i, r_i, t_i ( 1 <= l_i <= r_i <= 10^9; t_i in {1, 2 } ) -- description of the i -th segment. Print the maximum number of segments that can be selected, so that there is no bad pair among the selected segments. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
89134134 |
Rainbow_sjy |
F |
Aug. 6, 2020, 2:59 p.m. |
OK |
GNU C++11 |
TESTS |
70 |
78 |
12800000 |
|
|
88886589 |
Dzhao |
F |
Aug. 4, 2020, 3:56 p.m. |
OK |
GNU C++11 |
TESTS |
70 |
108 |
12800000 |
|
|
89799302 |
Tommy0103 |
F |
Aug. 13, 2020, 1:43 p.m. |
OK |
GNU C++11 |
TESTS |
70 |
109 |
9625600 |
|
|
88629783 |
huayucaiji |
F |
Aug. 1, 2020, 2:49 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
109 |
15155200 |
|
|
88629779 |
huayucaiji |
F |
Aug. 1, 2020, 2:49 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
109 |
15155200 |
|
|
89345599 |
luogu_bot4 |
F |
Aug. 8, 2020, 3:11 p.m. |
OK |
GNU C++11 |
TESTS |
70 |
124 |
15155200 |
|
|
89516366 |
nowrin_brown |
F |
Aug. 10, 2020, 2:07 p.m. |
OK |
GNU C++11 |
TESTS |
70 |
140 |
12800000 |
|
|
88630548 |
Zars19 |
F |
Aug. 1, 2020, 3:12 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
155 |
12800000 |
|
|
88911016 |
2018liuzhiyuan |
F |
Aug. 5, 2020, 2:45 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
155 |
16486400 |
|
|
89832974 |
luogu_bot3 |
F |
Aug. 14, 2020, 1:02 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
156 |
9728000 |
|
|
88804957 |
Blue233333Weak |
F |
Aug. 3, 2020, 1:58 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
171 |
9216000 |
|
|
90298398 |
vjudge5 |
F |
Aug. 18, 2020, 10:27 a.m. |
OK |
GNU C++14 |
TESTS |
70 |
171 |
9728000 |
|
|
89171729 |
silxi |
F |
Aug. 7, 2020, 4:16 a.m. |
OK |
GNU C++14 |
TESTS |
70 |
217 |
10342400 |
|
|
88698689 |
ydvsahil |
F |
Aug. 2, 2020, 1:50 a.m. |
OK |
GNU C++14 |
TESTS |
70 |
218 |
10649600 |
|
|
90812410 |
Hyperbolic |
F |
Aug. 24, 2020, 9:27 a.m. |
OK |
GNU C++14 |
TESTS |
70 |
233 |
20377600 |
|
|
88637308 |
tung_la_vo_gia |
F |
Aug. 1, 2020, 5:59 a.m. |
OK |
GNU C++14 |
TESTS |
70 |
233 |
34406400 |
|
|
88673222 |
chaitanya |
F |
Aug. 1, 2020, 2:36 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
234 |
15155200 |
|
|
89986755 |
nicoing |
F |
Aug. 15, 2020, 5:01 a.m. |
OK |
GNU C++14 |
TESTS |
70 |
234 |
20172800 |
|
|
89352280 |
joey0320 |
F |
Aug. 8, 2020, 4:59 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
265 |
16384000 |
|
|
90194861 |
abhi_neel |
F |
Aug. 17, 2020, 5:11 a.m. |
OK |
GNU C++14 |
TESTS |
70 |
280 |
8908800 |
|
|
88655038 |
kira2612 |
F |
Aug. 1, 2020, 10:22 a.m. |
OK |
GNU C++17 |
TESTS |
70 |
218 |
12697600 |
|
|
88928607 |
TwentyFour |
F |
Aug. 5, 2020, 8:26 a.m. |
OK |
GNU C++17 |
TESTS |
70 |
233 |
10752000 |
|
|
89771918 |
SGHD |
F |
Aug. 13, 2020, 7:43 a.m. |
OK |
GNU C++17 |
TESTS |
70 |
234 |
11468800 |
|
|
88671612 |
CQXYM |
F |
Aug. 1, 2020, 2:13 p.m. |
OK |
GNU C++17 |
TESTS |
70 |
234 |
16384000 |
|
|
91674900 |
IsaacMoris |
F |
Sept. 2, 2020, 9:15 p.m. |
OK |
GNU C++17 |
TESTS |
70 |
249 |
9728000 |
|
|
90277816 |
Chanyuh |
F |
Aug. 18, 2020, 5:19 a.m. |
OK |
GNU C++17 |
TESTS |
70 |
249 |
10035200 |
|
|
90186864 |
juxtaposek |
F |
Aug. 17, 2020, 2:42 a.m. |
OK |
GNU C++17 |
TESTS |
70 |
249 |
12697600 |
|
|
88915920 |
ankit101082000 |
F |
Aug. 5, 2020, 4:53 a.m. |
OK |
GNU C++17 |
TESTS |
70 |
249 |
16384000 |
|
|
88699326 |
vjudge5 |
F |
Aug. 2, 2020, 2:19 a.m. |
OK |
GNU C++17 |
TESTS |
70 |
249 |
16384000 |
|
|
88696078 |
WJMDBMR |
F |
Aug. 1, 2020, 11:11 p.m. |
OK |
GNU C++17 |
TESTS |
70 |
249 |
16384000 |
|
|
90193331 |
neal |
F |
Aug. 17, 2020, 4:47 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
155 |
6963200 |
|
|
90443234 |
hello_codeforces |
F |
Aug. 20, 2020, 7:46 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
156 |
12902400 |
|
|
90435639 |
hello_codeforces |
F |
Aug. 20, 2020, 5:46 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
156 |
12902400 |
|
|
90434355 |
hello_codeforces |
F |
Aug. 20, 2020, 5:22 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
156 |
12902400 |
|
|
90432549 |
hello_codeforces |
F |
Aug. 20, 2020, 4:42 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
170 |
12902400 |
|
|
90441198 |
hello_codeforces |
F |
Aug. 20, 2020, 7:16 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
171 |
12902400 |
|
|
90432229 |
hello_codeforces |
F |
Aug. 20, 2020, 4:34 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
171 |
12902400 |
|
|
88885596 |
Koo_ |
F |
Aug. 4, 2020, 3:43 p.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
171 |
18636800 |
|
|
89173626 |
sharrad99 |
F |
Aug. 7, 2020, 4:54 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
218 |
18841600 |
|
|
88637972 |
dysyn1314 |
F |
Aug. 1, 2020, 6:12 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
234 |
36044800 |
|
|
89721177 |
meooow |
F |
Aug. 12, 2020, 4:21 p.m. |
OK |
Go |
TESTS |
70 |
374 |
23347200 |
|
|
89746525 |
meooow |
F |
Aug. 12, 2020, 10:07 p.m. |
OK |
Go |
TESTS |
70 |
670 |
56320000 |
|
|
90420557 |
PizzaLovers007 |
F |
Aug. 19, 2020, 9:05 p.m. |
OK |
Java 11 |
TESTS |
70 |
545 |
12902400 |
|
|
88911910 |
StepMommy |
F |
Aug. 5, 2020, 3:09 a.m. |
OK |
Java 11 |
TESTS |
70 |
1840 |
142336000 |
|
|
88911079 |
StepMommy |
F |
Aug. 5, 2020, 2:46 a.m. |
OK |
Java 11 |
TESTS |
70 |
1934 |
104960000 |
|
|
88910978 |
StepMommy |
F |
Aug. 5, 2020, 2:43 a.m. |
OK |
Java 11 |
TESTS |
70 |
1949 |
158515200 |
|
|
89146499 |
reborn.chris |
F |
Aug. 6, 2020, 5:16 p.m. |
OK |
Java 8 |
TESTS |
70 |
733 |
55910400 |
|
|
89342343 |
TheSawan |
F |
Aug. 8, 2020, 2:26 p.m. |
OK |
Java 8 |
TESTS |
70 |
764 |
61132800 |
|
|
88903152 |
MagentaCobra |
F |
Aug. 4, 2020, 9 p.m. |
OK |
Java 8 |
TESTS |
70 |
982 |
50585600 |
|
|
89165137 |
reborn.chris |
F |
Aug. 7, 2020, 1:41 a.m. |
OK |
Java 8 |
TESTS |
70 |
982 |
88576000 |
|
|
89165224 |
reborn.chris |
F |
Aug. 7, 2020, 1:44 a.m. |
OK |
Java 8 |
TESTS |
70 |
997 |
88576000 |
|
|
88902898 |
MagentaCobra |
F |
Aug. 4, 2020, 8:51 p.m. |
OK |
Java 8 |
TESTS |
70 |
1590 |
138240000 |
|
|
91319872 |
derrick20 |
F |
Aug. 30, 2020, 3:11 a.m. |
OK |
Java 8 |
TESTS |
70 |
1731 |
103321600 |
|
|
89596880 |
EmK |
F |
Aug. 11, 2020, 4:58 p.m. |
OK |
Mono C# |
TESTS |
70 |
935 |
91545600 |
|
|
90334981 |
chinerist |
F |
Aug. 18, 2020, 5:58 p.m. |
OK |
PyPy 3 |
TESTS |
70 |
1871 |
111923200 |
|
|
90360014 |
chinerist |
F |
Aug. 19, 2020, 5:39 a.m. |
OK |
PyPy 3 |
TESTS |
70 |
1918 |
105062400 |
|
|
remove filters
Back to search problems