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 |
1055
|
Mail.Ru Cup 2018 Round 2 |
FINISHED |
False |
9000 |
189962699 |
Nov. 10, 2018, 2:35 p.m. |
Problems
B"You are a given a list of integers a_1, a_2, ldots, a_n and s of its segments [l_j; r_j] (where 1 <= l_j <= r_j <= n ). You need to select exactly m segments in such a way that the k -th order statistic of the multiset of a_i , where i is contained in at least one segment, is the smallest possible. If it's impossible to select a set of m segments in such a way that the multiset contains at least k elements, print -1. The k -th order statistic of a multiset is the value of the k -th element after sorting the multiset in non-descending order. The first line contains four integers n , s , m and k ( 1 <= m <= s <= 1500 , 1 <= k <= n <= 1500 ) -- the size of the list, the number of segments, the number of segments to choose and the statistic number. The second line contains n integers a_i ( 1 <= a_i <= 10^9 ) -- the values of the numbers in the list. Each of the next s lines contains two integers l_i and r_i ( 1 <= l_i <= r_i <= n ) -- the endpoints of the segments. It is possible that some segments coincide. Print exactly one integer -- the smallest possible k -th order statistic, or -1 if it's impossible to choose segments in a way that the multiset contains at least k elements. In the first example, one possible solution is to choose the first and the third segment. Together they will cover three elements of the list (all, except for the third one). This way the 2 -nd order statistic for the covered elements is 2 . "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
45545592 |
dragonslayerintraining |
E |
Nov. 11, 2018, 12:04 a.m. |
OK |
GNU C++11 |
TESTS |
48 |
31 |
102400 |
|
2400 |
45544935 |
dragonslayerintraining |
E |
Nov. 10, 2018, 10:51 p.m. |
OK |
GNU C++11 |
TESTS |
48 |
31 |
102400 |
|
2400 |
45526510 |
Um_nik |
E |
Nov. 10, 2018, 3:39 p.m. |
OK |
GNU C++11 |
TESTS |
48 |
31 |
102400 |
|
2400 |
48442229 |
zd11024 |
E |
Jan. 16, 2019, 4:52 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
16384000 |
|
2400 |
45534962 |
Weeeee |
E |
Nov. 10, 2018, 4:46 p.m. |
OK |
GNU C++11 |
TESTS |
48 |
46 |
102400 |
|
2400 |
45526857 |
SpyCheese |
E |
Nov. 10, 2018, 3:41 p.m. |
OK |
GNU C++11 |
TESTS |
48 |
46 |
102400 |
|
2400 |
69926103 |
duality |
E |
Jan. 31, 2020, 8:28 p.m. |
OK |
GNU C++11 |
TESTS |
51 |
46 |
9113600 |
|
2400 |
45865594 |
cuizhuyefei |
E |
Nov. 17, 2018, 7:54 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
46 |
9113600 |
|
2400 |
45793709 |
KCSC |
E |
Nov. 16, 2018, 9:02 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
46 |
9113600 |
|
2400 |
45539106 |
sqrtdecompton |
E |
Nov. 10, 2018, 6:28 p.m. |
OK |
GNU C++11 |
TESTS |
48 |
46 |
9113600 |
|
2400 |
45530765 |
Quang |
E |
Nov. 10, 2018, 4:11 p.m. |
OK |
GNU C++14 |
TESTS |
48 |
31 |
9216000 |
|
2400 |
45570027 |
860579 |
E |
Nov. 11, 2018, 5:13 p.m. |
OK |
GNU C++14 |
TESTS |
48 |
31 |
18432000 |
|
2400 |
45532401 |
Xellos |
E |
Nov. 10, 2018, 4:24 p.m. |
OK |
GNU C++14 |
TESTS |
48 |
46 |
4608000 |
|
2400 |
45545796 |
neal |
E |
Nov. 11, 2018, 12:33 a.m. |
OK |
GNU C++14 |
TESTS |
48 |
46 |
9113600 |
|
2400 |
45545775 |
neal |
E |
Nov. 11, 2018, 12:30 a.m. |
OK |
GNU C++14 |
TESTS |
48 |
46 |
9113600 |
|
2400 |
45542330 |
neal |
E |
Nov. 10, 2018, 8:18 p.m. |
OK |
GNU C++14 |
TESTS |
48 |
46 |
9113600 |
|
2400 |
45527402 |
WA_TLE |
E |
Nov. 10, 2018, 3:45 p.m. |
OK |
GNU C++14 |
TESTS |
48 |
46 |
9113600 |
|
2400 |
45686573 |
Navick |
E |
Nov. 13, 2018, 6:41 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
46 |
9216000 |
|
2400 |
45534818 |
sava-cska |
E |
Nov. 10, 2018, 4:45 p.m. |
OK |
GNU C++14 |
TESTS |
48 |
46 |
9216000 |
|
2400 |
45534513 |
liujunhao |
E |
Nov. 10, 2018, 4:42 p.m. |
OK |
GNU C++14 |
TESTS |
48 |
46 |
9216000 |
|
2400 |
45531628 |
Golovanov399 |
E |
Nov. 10, 2018, 4:18 p.m. |
OK |
GNU C++17 |
TESTS |
48 |
15 |
19456000 |
|
2400 |
53950174 |
maroonrk |
E |
May 10, 2019, 9:07 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
31 |
7065600 |
|
2400 |
45543485 |
ainta |
E |
Nov. 10, 2018, 9:15 p.m. |
OK |
GNU C++17 |
TESTS |
48 |
31 |
9113600 |
|
2400 |
45542459 |
mareksom |
E |
Nov. 10, 2018, 8:24 p.m. |
OK |
GNU C++17 |
TESTS |
48 |
31 |
9318400 |
|
2400 |
45532536 |
sharph |
E |
Nov. 10, 2018, 4:26 p.m. |
OK |
GNU C++17 |
TESTS |
48 |
31 |
20787200 |
|
2400 |
45529422 |
tlwpdus |
E |
Nov. 10, 2018, 4 p.m. |
OK |
GNU C++17 |
TESTS |
48 |
31 |
22016000 |
|
2400 |
45542788 |
teapotd |
E |
Nov. 10, 2018, 8:38 p.m. |
OK |
GNU C++17 |
TESTS |
48 |
46 |
409600 |
|
2400 |
45535190 |
PoDuReM |
E |
Nov. 10, 2018, 4:48 p.m. |
OK |
GNU C++17 |
TESTS |
48 |
46 |
1843200 |
|
2400 |
47307800 |
markotee |
E |
Dec. 20, 2018, 5:48 p.m. |
OK |
GNU C++17 |
TESTS |
51 |
46 |
9113600 |
|
2400 |
45539042 |
Roms |
E |
Nov. 10, 2018, 6:26 p.m. |
OK |
GNU C++17 |
TESTS |
48 |
46 |
9523200 |
|
2400 |
45521619 |
Petr |
E |
Nov. 10, 2018, 3:09 p.m. |
OK |
Java 8 |
TESTS |
51 |
140 |
4300800 |
|
2400 |
45521088 |
qwerty787788 |
E |
Nov. 10, 2018, 3:07 p.m. |
OK |
Java 8 |
TESTS |
48 |
296 |
0 |
|
2400 |
68396898 |
dalt |
E |
Jan. 8, 2020, 11:28 a.m. |
OK |
Java 8 |
TESTS |
51 |
343 |
24371200 |
|
2400 |
45530371 |
uwi |
E |
Nov. 10, 2018, 4:08 p.m. |
OK |
Java 8 |
TESTS |
48 |
389 |
49459200 |
|
2400 |
68488120 |
dalt |
E |
Jan. 10, 2020, 10:38 a.m. |
OK |
Java 8 |
TESTS |
51 |
405 |
24371200 |
|
2400 |
45635706 |
Suzukaze |
E |
Nov. 12, 2018, 7:02 p.m. |
OK |
Java 8 |
TESTS |
51 |
498 |
41779200 |
|
2400 |
62029562 |
beginner1010 |
E |
Oct. 6, 2019, 10:48 p.m. |
OK |
Java 8 |
TESTS |
51 |
842 |
30720000 |
|
2400 |
62029502 |
beginner1010 |
E |
Oct. 6, 2019, 10:45 p.m. |
OK |
Java 8 |
TESTS |
51 |
904 |
30720000 |
|
2400 |
45897099 |
tri |
E |
Nov. 18, 2018, 12:03 a.m. |
OK |
Java 8 |
TESTS |
51 |
982 |
4096000 |
|
2400 |
45580824 |
andrei.bogdanpuiu1999 |
E |
Nov. 12, 2018, 4:08 a.m. |
OK |
Java 8 |
TESTS |
51 |
1216 |
31334400 |
|
2400 |
45538979 |
peregrinus |
E |
Nov. 10, 2018, 6:25 p.m. |
OK |
Mono C# |
TESTS |
48 |
109 |
80384000 |
|
2400 |
53094255 |
vjudge4 |
E |
April 21, 2019, 12:43 p.m. |
OK |
MS C++ |
TESTS |
51 |
295 |
16076800 |
|
2400 |
52356473 |
P___ |
E |
April 5, 2019, 5:07 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
265 |
18432000 |
|
2400 |
52356351 |
P___ |
E |
April 5, 2019, 5:03 p.m. |
OK |
MS C++ 2017 |
TESTS |
51 |
1965 |
18432000 |
|
2400 |
45678607 |
yakamoto |
E |
Nov. 13, 2018, 2:19 p.m. |
OK |
Scala |
TESTS |
51 |
499 |
5324800 |
|
2400 |
remove filters
Back to search problems