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'The only difference between easy and hard versions is constraints. You are given n segments on the coordinate axis OX . Segments can intersect, lie inside each other and even coincide. The i -th segment is [l_i; r_i] ( l_i <= r_i ) and it covers all integer points j such that l_i <= j <= r_i . The integer point is called bad if it is covered by strictly more than k segments. Your task is to remove the minimum number of segments so that there are no bad points at all. The first line of the input contains two integers n and k ( 1 <= k <= n <= 200 ) -- the number of segments and the maximum number of segments by which each integer point can be covered. The next n lines contain segments. The i -th line contains two integers l_i and r_i ( 1 <= l_i <= r_i <= 200 ) -- the endpoints of the i -th segment. In the first line print one integer m ( 0 <= m <= n ) -- the minimum number of segments you need to remove so that there are no bad points. In the second line print m distinct integers p_1, p_2, ... , p_m ( 1 <= p_i <= n ) -- indices of segments you remove in any order. If there are multiple answers, you can print any of them. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
66081829 |
rr_ |
D1 |
Dec. 1, 2019, 12:37 a.m. |
OK |
D |
TESTS |
36 |
46 |
0 |
|
1900 |
64476768 |
chaorenhaha |
D1 |
Nov. 7, 2019, 2:37 p.m. |
OK |
FPC |
TESTS |
36 |
46 |
0 |
|
1900 |
64653136 |
torque_459 |
D1 |
Nov. 10, 2019, 6:08 p.m. |
OK |
GNU C11 |
TESTS |
36 |
30 |
0 |
|
1900 |
69257715 |
vjudge4 |
D1 |
Jan. 21, 2020, 4:08 p.m. |
OK |
GNU C11 |
TESTS |
36 |
31 |
0 |
|
1900 |
63215582 |
YOK |
D1 |
Oct. 23, 2019, 5:58 a.m. |
OK |
GNU C11 |
TESTS |
36 |
31 |
0 |
|
1900 |
63609606 |
XMH |
D1 |
Oct. 27, 2019, 4:37 p.m. |
OK |
GNU C++11 |
TESTS |
36 |
30 |
0 |
|
1900 |
67417671 |
vjudge4 |
D1 |
Dec. 22, 2019, 10:30 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
30 |
0 |
|
1900 |
63269753 |
REFLAME_ASH |
D1 |
Oct. 24, 2019, 3:11 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
30 |
3174400 |
|
1900 |
63929501 |
zyounan |
D1 |
Oct. 31, 2019, 1:54 p.m. |
OK |
GNU C++11 |
TESTS |
36 |
30 |
3993600 |
|
1900 |
63391567 |
seekluna_xrc |
D1 |
Oct. 25, 2019, 3:24 p.m. |
OK |
GNU C++11 |
TESTS |
36 |
30 |
8806400 |
|
1900 |
63226869 |
24680esz |
D1 |
Oct. 23, 2019, 9:36 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
30 |
23859200 |
|
1900 |
68837262 |
ThoseBygones |
D1 |
Jan. 15, 2020, 3:58 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
31 |
0 |
|
1900 |
68837452 |
ThoseBygones |
D1 |
Jan. 15, 2020, 4:04 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
31 |
0 |
|
1900 |
68837581 |
ThoseBygones |
D1 |
Jan. 15, 2020, 4:08 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
31 |
0 |
|
1900 |
69571353 |
vjudge4 |
D1 |
Jan. 26, 2020, 2:11 p.m. |
OK |
GNU C++11 |
TESTS |
36 |
31 |
0 |
|
1900 |
63213529 |
heath_cliff |
D1 |
Oct. 23, 2019, 5:05 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
15 |
0 |
|
1900 |
64121041 |
doublebit |
D1 |
Nov. 3, 2019, 1:19 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
15 |
0 |
|
1900 |
63211592 |
iefnah06 |
D1 |
Oct. 23, 2019, 4:10 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
15 |
102400 |
|
1900 |
69679712 |
vjudge1 |
D1 |
Jan. 28, 2020, 3:15 p.m. |
OK |
GNU C++14 |
TESTS |
36 |
15 |
204800 |
|
1900 |
66668014 |
vjudge3 |
D1 |
Dec. 12, 2019, 8:03 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
15 |
204800 |
|
1900 |
63721206 |
bnmd |
D1 |
Oct. 29, 2019, 11:25 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
15 |
409600 |
|
1900 |
63209217 |
Dungtd1304 |
D1 |
Oct. 23, 2019, 2:36 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
15 |
716800 |
|
1900 |
63250354 |
Gh0stMan |
D1 |
Oct. 23, 2019, 3:50 p.m. |
OK |
GNU C++14 |
TESTS |
36 |
15 |
1638400 |
|
1900 |
63344092 |
neew_B |
D1 |
Oct. 24, 2019, 6:37 p.m. |
OK |
GNU C++14 |
TESTS |
36 |
15 |
1638400 |
|
1900 |
63358474 |
william40614 |
D1 |
Oct. 25, 2019, 4:11 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
15 |
2560000 |
|
1900 |
63371891 |
kanpur_s |
D1 |
Oct. 25, 2019, 9:39 a.m. |
OK |
GNU C++17 |
TESTS |
36 |
15 |
0 |
|
1900 |
63371942 |
priyanshu_98 |
D1 |
Oct. 25, 2019, 9:40 a.m. |
OK |
GNU C++17 |
TESTS |
36 |
15 |
0 |
|
1900 |
64172556 |
abdelrahman____tarek |
D1 |
Nov. 3, 2019, 7:06 p.m. |
OK |
GNU C++17 |
TESTS |
36 |
15 |
0 |
|
1900 |
64597895 |
adimiclaus15 |
D1 |
Nov. 9, 2019, 5:29 p.m. |
OK |
GNU C++17 |
TESTS |
36 |
15 |
0 |
|
1900 |
63202302 |
Felerius |
D1 |
Oct. 22, 2019, 9:17 p.m. |
OK |
GNU C++17 |
TESTS |
36 |
15 |
204800 |
|
1900 |
65024405 |
ravi.kaushal97 |
D1 |
Nov. 15, 2019, 6:55 a.m. |
OK |
GNU C++17 |
TESTS |
36 |
15 |
204800 |
|
1900 |
67506624 |
Dynamic. |
D1 |
Dec. 24, 2019, 7:32 a.m. |
OK |
GNU C++17 |
TESTS |
36 |
15 |
204800 |
|
1900 |
66444257 |
abc864197532 |
D1 |
Dec. 7, 2019, 9:02 a.m. |
OK |
GNU C++17 |
TESTS |
36 |
15 |
2560000 |
|
1900 |
64797661 |
jie_jq |
D1 |
Nov. 13, 2019, 1:27 p.m. |
OK |
GNU C++17 |
TESTS |
36 |
15 |
2560000 |
|
1900 |
63284282 |
Misuchii_Shin |
D1 |
Oct. 24, 2019, 9:46 a.m. |
OK |
GNU C++17 |
TESTS |
36 |
15 |
2560000 |
|
1900 |
63301420 |
reanimatorzon |
D1 |
Oct. 24, 2019, 2:24 p.m. |
OK |
Go |
TESTS |
36 |
31 |
0 |
|
1900 |
64748206 |
potatmen |
D1 |
Nov. 12, 2019, 2:17 p.m. |
OK |
Java 11 |
TESTS |
36 |
187 |
0 |
|
1900 |
63741753 |
IslamTalipovTop |
D1 |
Oct. 29, 2019, 5:12 p.m. |
OK |
Java 11 |
TESTS |
36 |
187 |
0 |
|
1900 |
63251658 |
Ahmed_Diab |
D1 |
Oct. 23, 2019, 4:16 p.m. |
OK |
Java 11 |
TESTS |
36 |
202 |
0 |
|
1900 |
63453700 |
tapanr97 |
D1 |
Oct. 26, 2019, 11:27 a.m. |
OK |
Java 11 |
TESTS |
36 |
234 |
7065600 |
|
1900 |
63216170 |
Tatsuyaaaa |
D1 |
Oct. 23, 2019, 6:11 a.m. |
OK |
Java 8 |
TESTS |
36 |
109 |
0 |
|
1900 |
63283919 |
shu37052 |
D1 |
Oct. 24, 2019, 9:38 a.m. |
OK |
Java 8 |
TESTS |
36 |
109 |
0 |
|
1900 |
63417593 |
applemelon |
D1 |
Oct. 26, 2019, 5:04 a.m. |
OK |
Java 8 |
TESTS |
36 |
124 |
0 |
|
1900 |
68457747 |
GiantTornado |
D1 |
Jan. 9, 2020, 4:54 p.m. |
OK |
Java 8 |
TESTS |
36 |
124 |
0 |
|
1900 |
68063132 |
amolpratap007 |
D1 |
Jan. 2, 2020, 5:56 a.m. |
OK |
Java 8 |
TESTS |
36 |
124 |
0 |
|
1900 |
64698718 |
Leendertz |
D1 |
Nov. 11, 2019, 2:08 p.m. |
OK |
Java 8 |
TESTS |
36 |
124 |
0 |
|
1900 |
64667162 |
dyhu083 |
D1 |
Nov. 11, 2019, 3:22 a.m. |
OK |
Java 8 |
TESTS |
36 |
124 |
0 |
|
1900 |
64525762 |
Nutella3000 |
D1 |
Nov. 8, 2019, 1:45 p.m. |
OK |
Java 8 |
TESTS |
36 |
124 |
0 |
|
1900 |
64181963 |
NormalGeek |
D1 |
Nov. 4, 2019, 1:42 a.m. |
OK |
Java 8 |
TESTS |
36 |
124 |
0 |
|
1900 |
63407692 |
jdurie |
D1 |
Oct. 25, 2019, 9:20 p.m. |
OK |
Java 8 |
TESTS |
36 |
124 |
0 |
|
1900 |
63213047 |
Spheniscine |
D1 |
Oct. 23, 2019, 4:53 a.m. |
OK |
Kotlin |
TESTS |
36 |
140 |
0 |
|
1900 |
66145033 |
hyper_sinnniy |
D1 |
Dec. 1, 2019, 4:11 p.m. |
OK |
Kotlin |
TESTS |
36 |
202 |
7577600 |
|
1900 |
63277596 |
m1_k3 |
D1 |
Oct. 24, 2019, 7:30 a.m. |
OK |
Mono C# |
TESTS |
36 |
77 |
0 |
|
1900 |
66731801 |
vjudge1 |
D1 |
Dec. 12, 2019, 5:45 p.m. |
OK |
MS C++ |
TESTS |
36 |
31 |
0 |
|
1900 |
64470648 |
vjudge4 |
D1 |
Nov. 7, 2019, 12:59 p.m. |
OK |
MS C++ |
TESTS |
36 |
31 |
0 |
|
1900 |
64386553 |
vjudge2 |
D1 |
Nov. 6, 2019, 3:33 p.m. |
OK |
MS C++ |
TESTS |
36 |
31 |
0 |
|
1900 |
63728433 |
vjudge2 |
D1 |
Oct. 29, 2019, 1:20 p.m. |
OK |
MS C++ |
TESTS |
36 |
31 |
0 |
|
1900 |
63727834 |
vjudge4 |
D1 |
Oct. 29, 2019, 1:10 p.m. |
OK |
MS C++ |
TESTS |
36 |
31 |
0 |
|
1900 |
63727562 |
vjudge1 |
D1 |
Oct. 29, 2019, 1:06 p.m. |
OK |
MS C++ |
TESTS |
36 |
31 |
0 |
|
1900 |
63727458 |
vjudge4 |
D1 |
Oct. 29, 2019, 1:04 p.m. |
OK |
MS C++ |
TESTS |
36 |
31 |
0 |
|
1900 |
63727350 |
vjudge2 |
D1 |
Oct. 29, 2019, 1:02 p.m. |
OK |
MS C++ |
TESTS |
36 |
31 |
0 |
|
1900 |
63727349 |
vjudge4 |
D1 |
Oct. 29, 2019, 1:02 p.m. |
OK |
MS C++ |
TESTS |
36 |
31 |
0 |
|
1900 |
68808292 |
vjudge3 |
D1 |
Jan. 14, 2020, 3:53 p.m. |
OK |
MS C++ |
TESTS |
36 |
31 |
0 |
|
1900 |
63689038 |
MTHGHCO |
D1 |
Oct. 29, 2019, 1:01 a.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
15 |
0 |
|
1900 |
63830750 |
vjudge1 |
D1 |
Oct. 30, 2019, 1:34 p.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
31 |
0 |
|
1900 |
63728269 |
vjudge2 |
D1 |
Oct. 29, 2019, 1:17 p.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
31 |
0 |
|
1900 |
63726776 |
RONGER |
D1 |
Oct. 29, 2019, 12:53 p.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
31 |
0 |
|
1900 |
63689057 |
vjudge4 |
D1 |
Oct. 29, 2019, 1:02 a.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
31 |
0 |
|
1900 |
64176885 |
Still_Theory |
D1 |
Nov. 3, 2019, 9:27 p.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
31 |
0 |
|
1900 |
63278130 |
PanShiLiang_GG |
D1 |
Oct. 24, 2019, 7:43 a.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
31 |
0 |
|
1900 |
63251746 |
tanimania |
D1 |
Oct. 23, 2019, 4:17 p.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
31 |
0 |
|
1900 |
63659066 |
dbelov |
D1 |
Oct. 28, 2019, 1:33 p.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
31 |
0 |
|
1900 |
66452711 |
viz09 |
D1 |
Dec. 7, 2019, 12:04 p.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
31 |
307200 |
|
1900 |
63216198 |
EM1NEM |
D1 |
Oct. 23, 2019, 6:11 a.m. |
OK |
PyPy 2 |
TESTS |
36 |
171 |
2662400 |
|
1900 |
63383842 |
alex223 |
D1 |
Oct. 25, 2019, 1:14 p.m. |
OK |
PyPy 2 |
TESTS |
36 |
202 |
921600 |
|
1900 |
63428285 |
victarry |
D1 |
Oct. 26, 2019, 8:27 a.m. |
OK |
PyPy 3 |
TESTS |
36 |
140 |
1433600 |
|
1900 |
63230762 |
shade33 |
D1 |
Oct. 23, 2019, 10:53 a.m. |
OK |
PyPy 3 |
TESTS |
36 |
140 |
1433600 |
|
1900 |
63229724 |
pyduper |
D1 |
Oct. 23, 2019, 10:32 a.m. |
OK |
PyPy 3 |
TESTS |
36 |
155 |
1331200 |
|
1900 |
63535485 |
Enrico88 |
D1 |
Oct. 27, 2019, 7:57 a.m. |
OK |
PyPy 3 |
TESTS |
36 |
155 |
1433600 |
|
1900 |
63499347 |
deepakpadamata |
D1 |
Oct. 26, 2019, 4:39 p.m. |
OK |
PyPy 3 |
TESTS |
36 |
155 |
1433600 |
|
1900 |
63296178 |
bluenak |
D1 |
Oct. 24, 2019, 1:02 p.m. |
OK |
PyPy 3 |
TESTS |
36 |
155 |
1843200 |
|
1900 |
63216544 |
pyduper |
D1 |
Oct. 23, 2019, 6:17 a.m. |
OK |
PyPy 3 |
TESTS |
36 |
155 |
1843200 |
|
1900 |
63216449 |
grhkm |
D1 |
Oct. 23, 2019, 6:16 a.m. |
OK |
PyPy 3 |
TESTS |
36 |
155 |
1843200 |
|
1900 |
63208416 |
vaibhavsarda |
D1 |
Oct. 23, 2019, 1:56 a.m. |
OK |
PyPy 3 |
TESTS |
36 |
155 |
1843200 |
|
1900 |
64514152 |
titanlolcat |
D1 |
Nov. 8, 2019, 10:02 a.m. |
OK |
PyPy 3 |
TESTS |
36 |
155 |
1945600 |
|
1900 |
66869814 |
sritha |
D1 |
Dec. 14, 2019, 1:10 p.m. |
OK |
Python 3 |
TESTS |
36 |
109 |
0 |
|
1900 |
65396608 |
cameliapatilea |
D1 |
Nov. 19, 2019, 7:22 p.m. |
OK |
Python 3 |
TESTS |
36 |
109 |
307200 |
|
1900 |
64097547 |
MajAK |
D1 |
Nov. 2, 2019, 2:22 p.m. |
OK |
Python 3 |
TESTS |
36 |
124 |
0 |
|
1900 |
63433841 |
_Michael_ |
D1 |
Oct. 26, 2019, 9:57 a.m. |
OK |
Python 3 |
TESTS |
36 |
124 |
307200 |
|
1900 |
63413046 |
lightning_shandian |
D1 |
Oct. 26, 2019, 2:16 a.m. |
OK |
Python 3 |
TESTS |
36 |
139 |
409600 |
|
1900 |
63414203 |
lightning_shandian |
D1 |
Oct. 26, 2019, 3:03 a.m. |
OK |
Python 3 |
TESTS |
36 |
140 |
409600 |
|
1900 |
63266341 |
lightning_shandian |
D1 |
Oct. 24, 2019, 12:28 a.m. |
OK |
Python 3 |
TESTS |
36 |
140 |
409600 |
|
1900 |
63240347 |
hubata01 |
D1 |
Oct. 23, 2019, 1:18 p.m. |
OK |
Python 3 |
TESTS |
36 |
140 |
2867200 |
|
1900 |
68494498 |
smart_hard |
D1 |
Jan. 10, 2020, 12:55 p.m. |
OK |
Python 3 |
TESTS |
36 |
389 |
11468800 |
|
1900 |
63274353 |
areadyeye |
D1 |
Oct. 24, 2019, 6:06 a.m. |
OK |
Python 3 |
TESTS |
36 |
529 |
40038400 |
|
1900 |
63492781 |
43flyingcar |
D1 |
Oct. 26, 2019, 2:47 p.m. |
OK |
Rust |
TESTS |
36 |
62 |
8396800 |
|
1900 |
remove filters
Back to search problems