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"At first, there was a legend related to the name of the problem, but now it's just a formal statement. You are given n points a_1, a_2, ... , a_n on the OX axis. Now you are asked to find such an integer point x on OX axis that f_k(x) is minimal possible. The function f_k(x) can be described in the following way: If there are multiple optimal answers you can print any of them. The first line contains single integer T ( 1 <= T <= 2 cdot 10^5 ) -- number of queries. Next 2 cdot T lines contain descriptions of queries. All queries are independent. The first line of each query contains two integers n , k ( 1 <= n <= 2 cdot 10^5 , 0 <= k < n ) -- the number of points and constant k . The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_1 < a_2 < ... < a_n <= 10^9 ) -- points in ascending order. It's guaranteed that sum{n} doesn't exceed 2 cdot 10^5 . Print T integers -- corresponding points x which have minimal possible value of f_k(x) . 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 |
55302113 |
jiangly |
C |
June 8, 2019, 12:29 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
17 |
670 |
0 |
|
1600 |
55284890 |
rlac |
C |
June 8, 2019, 4:09 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
17 |
1169 |
1024000 |
|
1600 |
62518814 |
LaSWeeG |
C |
Oct. 13, 2019, 3:08 p.m. |
OK |
FPC |
TESTS |
17 |
670 |
819200 |
|
1600 |
55605599 |
rainboy |
C |
June 15, 2019, 10:39 p.m. |
OK |
GNU C11 |
TESTS |
17 |
780 |
819200 |
|
1600 |
55183658 |
CJK000 |
C |
June 6, 2019, 1:42 a.m. |
OK |
GNU C11 |
TESTS |
17 |
780 |
1228800 |
|
1600 |
55318052 |
vjudge3 |
C |
June 9, 2019, 1:17 a.m. |
OK |
GNU C11 |
TESTS |
17 |
795 |
819200 |
|
1600 |
61047778 |
nikhilreddy123 |
C |
Sept. 22, 2019, 5:18 a.m. |
OK |
GNU C11 |
TESTS |
17 |
795 |
819200 |
|
1600 |
55179103 |
rajanjha |
C |
June 5, 2019, 8:22 p.m. |
OK |
GNU C11 |
TESTS |
17 |
795 |
1536000 |
|
1600 |
56172218 |
Noble_Mushtak |
C |
June 27, 2019, 5:13 p.m. |
OK |
GNU C11 |
TESTS |
17 |
795 |
1638400 |
|
1600 |
55171897 |
dhruvmalh |
C |
June 5, 2019, 5:11 p.m. |
OK |
GNU C11 |
TESTS |
17 |
826 |
1638400 |
|
1600 |
58175837 |
vjudge5 |
C |
Aug. 2, 2019, 1:02 p.m. |
OK |
GNU C++11 |
TESTS |
17 |
31 |
1843200 |
|
1600 |
55610549 |
ReaLNero1 |
C |
June 16, 2019, 5:24 a.m. |
OK |
GNU C++11 |
TESTS |
17 |
46 |
614400 |
|
1600 |
55228125 |
liubin |
C |
June 7, 2019, 3:30 a.m. |
OK |
GNU C++11 |
TESTS |
17 |
46 |
819200 |
|
1600 |
55192627 |
DennyQi |
C |
June 6, 2019, 7:07 a.m. |
OK |
GNU C++11 |
TESTS |
17 |
61 |
614400 |
|
1600 |
60072423 |
1910903 |
C |
Sept. 5, 2019, 11:34 a.m. |
OK |
GNU C++11 |
TESTS |
17 |
61 |
4710400 |
|
1600 |
58852299 |
luogu_bot5 |
C |
Aug. 15, 2019, 7:58 a.m. |
OK |
GNU C++11 |
TESTS |
17 |
62 |
921600 |
|
1600 |
58164275 |
vjudge3 |
C |
Aug. 2, 2019, 8:30 a.m. |
OK |
GNU C++11 |
TESTS |
17 |
62 |
1638400 |
|
1600 |
55201231 |
newbiechdboom0 |
C |
June 6, 2019, 10:41 a.m. |
OK |
GNU C++11 |
TESTS |
17 |
62 |
1638400 |
|
1600 |
55183877 |
ZechariahQAQ |
C |
June 6, 2019, 1:54 a.m. |
OK |
GNU C++11 |
TESTS |
17 |
62 |
2457600 |
|
1600 |
55184187 |
Zechariah_2001 |
C |
June 6, 2019, 2:09 a.m. |
OK |
GNU C++11 |
TESTS |
17 |
62 |
2457600 |
|
1600 |
56627536 |
supremeyu |
C |
July 6, 2019, 2:41 p.m. |
OK |
GNU C++14 |
TESTS |
17 |
139 |
819200 |
|
1600 |
55396454 |
HipHop |
C |
June 10, 2019, 11:59 a.m. |
OK |
GNU C++14 |
TESTS |
17 |
139 |
819200 |
|
1600 |
55205643 |
naina_gupta |
C |
June 6, 2019, 12:26 p.m. |
OK |
GNU C++14 |
TESTS |
17 |
140 |
716800 |
|
1600 |
58461005 |
efimmanevich |
C |
Aug. 8, 2019, 4:29 p.m. |
OK |
GNU C++14 |
TESTS |
17 |
140 |
819200 |
|
1600 |
55233805 |
ilshin |
C |
June 7, 2019, 7:14 a.m. |
OK |
GNU C++14 |
TESTS |
17 |
140 |
819200 |
|
1600 |
55173889 |
Black.n.White |
C |
June 5, 2019, 5:50 p.m. |
OK |
GNU C++14 |
TESTS |
17 |
140 |
819200 |
|
1600 |
64365121 |
kgcurry59 |
C |
Nov. 6, 2019, 12:49 p.m. |
OK |
GNU C++14 |
TESTS |
17 |
155 |
819200 |
|
1600 |
59795196 |
Scut82 |
C |
Aug. 31, 2019, 8:26 a.m. |
OK |
GNU C++14 |
TESTS |
17 |
155 |
819200 |
|
1600 |
58174767 |
preda2or |
C |
Aug. 2, 2019, 12:38 p.m. |
OK |
GNU C++14 |
TESTS |
17 |
155 |
819200 |
|
1600 |
67685068 |
TheCerberus |
C |
Dec. 27, 2019, 8:29 a.m. |
OK |
GNU C++14 |
TESTS |
17 |
155 |
819200 |
|
1600 |
57556612 |
lesskreker |
C |
July 22, 2019, 8:11 p.m. |
OK |
GNU C++17 |
TESTS |
17 |
46 |
819200 |
|
1600 |
55303462 |
MogLin |
C |
June 8, 2019, 1:03 p.m. |
OK |
GNU C++17 |
TESTS |
17 |
140 |
819200 |
|
1600 |
56753596 |
i_lower |
C |
July 9, 2019, 12:56 p.m. |
OK |
GNU C++17 |
TESTS |
17 |
140 |
819200 |
|
1600 |
55294136 |
Alpha_SCP014_ |
C |
June 8, 2019, 9:06 a.m. |
OK |
GNU C++17 |
TESTS |
17 |
140 |
1638400 |
|
1600 |
59264168 |
Artyom123 |
C |
Aug. 22, 2019, 9:59 a.m. |
OK |
GNU C++17 |
TESTS |
17 |
155 |
819200 |
|
1600 |
56850271 |
swimmerstar |
C |
July 11, 2019, 3:23 p.m. |
OK |
GNU C++17 |
TESTS |
17 |
155 |
819200 |
|
1600 |
67646885 |
bularond |
C |
Dec. 26, 2019, 10:33 a.m. |
OK |
GNU C++17 |
TESTS |
17 |
155 |
819200 |
|
1600 |
67668084 |
helThazar |
C |
Dec. 26, 2019, 6:47 p.m. |
OK |
GNU C++17 |
TESTS |
17 |
155 |
819200 |
|
1600 |
68661982 |
angrysqrt3 |
C |
Jan. 12, 2020, 1:56 p.m. |
OK |
GNU C++17 |
TESTS |
17 |
155 |
819200 |
|
1600 |
68725328 |
adiforluls |
C |
Jan. 13, 2020, 5:42 p.m. |
OK |
GNU C++17 |
TESTS |
17 |
155 |
819200 |
|
1600 |
67791778 |
c1729 |
C |
Dec. 28, 2019, 2:57 p.m. |
OK |
Go |
TESTS |
17 |
62 |
13414400 |
|
1600 |
67790971 |
c1729 |
C |
Dec. 28, 2019, 2:38 p.m. |
OK |
Go |
TESTS |
17 |
685 |
13516800 |
|
1600 |
67791093 |
c1729 |
C |
Dec. 28, 2019, 2:41 p.m. |
OK |
Go |
TESTS |
17 |
701 |
13516800 |
|
1600 |
67790793 |
c1729 |
C |
Dec. 28, 2019, 2:34 p.m. |
OK |
Go |
TESTS |
17 |
717 |
13516800 |
|
1600 |
55283677 |
Lancern |
C |
June 8, 2019, 3:21 a.m. |
OK |
Go |
TESTS |
17 |
748 |
5222400 |
|
1600 |
56442583 |
dioji |
C |
July 2, 2019, 5:10 p.m. |
OK |
Go |
TESTS |
17 |
1029 |
5324800 |
|
1600 |
55710594 |
nickname15 |
C |
June 18, 2019, 10:05 a.m. |
OK |
Haskell |
TESTS |
17 |
936 |
111411200 |
|
1600 |
57005026 |
amolpratap007 |
C |
July 14, 2019, 6:15 a.m. |
OK |
Java 8 |
TESTS |
17 |
139 |
0 |
|
1600 |
55750989 |
practiceconstant |
C |
June 19, 2019, 12:44 p.m. |
OK |
Java 8 |
TESTS |
17 |
140 |
0 |
|
1600 |
55188610 |
dalt |
C |
June 6, 2019, 5:16 a.m. |
OK |
Java 8 |
TESTS |
17 |
140 |
10854400 |
|
1600 |
56822335 |
r_sutaria |
C |
July 11, 2019, 1:41 a.m. |
OK |
Java 8 |
TESTS |
17 |
155 |
0 |
|
1600 |
68436080 |
Bhavya_Arora |
C |
Jan. 9, 2020, 9:01 a.m. |
OK |
Java 8 |
TESTS |
17 |
155 |
0 |
|
1600 |
55985502 |
sooraj10 |
C |
June 24, 2019, 2:59 a.m. |
OK |
Java 8 |
TESTS |
17 |
155 |
0 |
|
1600 |
55286458 |
prakhar897 |
C |
June 8, 2019, 5:15 a.m. |
OK |
Java 8 |
TESTS |
17 |
155 |
0 |
|
1600 |
55229781 |
thisbeit |
C |
June 7, 2019, 4:48 a.m. |
OK |
Java 8 |
TESTS |
17 |
155 |
0 |
|
1600 |
55206782 |
te_amo |
C |
June 6, 2019, 12:54 p.m. |
OK |
Java 8 |
TESTS |
17 |
155 |
0 |
|
1600 |
55197850 |
bluesky111 |
C |
June 6, 2019, 9:17 a.m. |
OK |
Java 8 |
TESTS |
17 |
155 |
13312000 |
|
1600 |
60846398 |
Spheniscine |
C |
Sept. 19, 2019, 12:40 p.m. |
OK |
Kotlin |
TESTS |
17 |
249 |
6144000 |
|
1600 |
56523365 |
Intrincantation |
C |
July 4, 2019, 3:59 p.m. |
OK |
Kotlin |
TESTS |
17 |
1793 |
17203200 |
|
1600 |
58227574 |
og.kostya |
C |
Aug. 3, 2019, 3:10 p.m. |
OK |
Mono C# |
TESTS |
17 |
124 |
3174400 |
|
1600 |
55227972 |
camypaper |
C |
June 7, 2019, 3:24 a.m. |
OK |
Mono C# |
TESTS |
17 |
187 |
14745600 |
|
1600 |
55180438 |
SegaMegaDrive |
C |
June 5, 2019, 9:39 p.m. |
OK |
Mono C# |
TESTS |
17 |
249 |
25497600 |
|
1600 |
56794826 |
treasuryonly |
C |
July 10, 2019, 12:07 p.m. |
OK |
Mono C# |
TESTS |
17 |
280 |
19763200 |
|
1600 |
55275806 |
Miracle |
C |
June 7, 2019, 6:58 p.m. |
OK |
Mono C# |
TESTS |
17 |
1481 |
25395200 |
|
1600 |
55188701 |
QuantumKnight |
C |
June 6, 2019, 5:20 a.m. |
OK |
Mono C# |
TESTS |
17 |
1496 |
28467200 |
|
1600 |
57777375 |
vjudge5 |
C |
July 26, 2019, 4:19 a.m. |
OK |
MS C++ |
TESTS |
17 |
124 |
819200 |
|
1600 |
55227095 |
tang0404 |
C |
June 7, 2019, 2:40 a.m. |
OK |
MS C++ |
TESTS |
17 |
124 |
819200 |
|
1600 |
55612335 |
ProjectBuild |
C |
June 16, 2019, 6:41 a.m. |
OK |
MS C++ |
TESTS |
17 |
124 |
819200 |
|
1600 |
55300712 |
vjudge4 |
C |
June 8, 2019, 11:55 a.m. |
OK |
MS C++ |
TESTS |
17 |
124 |
819200 |
|
1600 |
57778352 |
vjudge1 |
C |
July 26, 2019, 4:51 a.m. |
OK |
MS C++ |
TESTS |
17 |
124 |
1638400 |
|
1600 |
65527110 |
vjudge4 |
C |
Nov. 22, 2019, 10:51 a.m. |
OK |
MS C++ |
TESTS |
17 |
124 |
3174400 |
|
1600 |
57848588 |
vjudge4 |
C |
July 27, 2019, 12:12 p.m. |
OK |
MS C++ |
TESTS |
17 |
139 |
819200 |
|
1600 |
55591104 |
scorpiowf |
C |
June 15, 2019, 12:26 p.m. |
OK |
MS C++ |
TESTS |
17 |
140 |
819200 |
|
1600 |
55301714 |
vjudge5 |
C |
June 8, 2019, 12:19 p.m. |
OK |
MS C++ |
TESTS |
17 |
140 |
819200 |
|
1600 |
59854468 |
vjudge4 |
C |
Sept. 1, 2019, 12:58 p.m. |
OK |
MS C++ |
TESTS |
17 |
140 |
1638400 |
|
1600 |
55204313 |
R99 |
C |
June 6, 2019, 11:55 a.m. |
OK |
MS C++ 2017 |
TESTS |
17 |
202 |
819200 |
|
1600 |
55195332 |
NPUlzh |
C |
June 6, 2019, 8:16 a.m. |
OK |
MS C++ 2017 |
TESTS |
17 |
202 |
1638400 |
|
1600 |
55172999 |
qwe123rt45 |
C |
June 5, 2019, 5:32 p.m. |
OK |
MS C++ 2017 |
TESTS |
17 |
217 |
819200 |
|
1600 |
56002639 |
xsc |
C |
June 24, 2019, 1:46 p.m. |
OK |
MS C++ 2017 |
TESTS |
17 |
217 |
819200 |
|
1600 |
56530344 |
petko_mitkov |
C |
July 4, 2019, 7:18 p.m. |
OK |
MS C++ 2017 |
TESTS |
17 |
218 |
819200 |
|
1600 |
55194809 |
ZiJohnCena |
C |
June 6, 2019, 8:03 a.m. |
OK |
MS C++ 2017 |
TESTS |
17 |
233 |
819200 |
|
1600 |
55528397 |
F91WoDaGe |
C |
June 13, 2019, 12:19 p.m. |
OK |
MS C++ 2017 |
TESTS |
17 |
249 |
48025600 |
|
1600 |
69647654 |
suun |
C |
Jan. 28, 2020, 2:49 a.m. |
OK |
MS C++ 2017 |
TESTS |
17 |
468 |
819200 |
|
1600 |
56509555 |
Still_Theory |
C |
July 4, 2019, 9:40 a.m. |
OK |
MS C++ 2017 |
TESTS |
17 |
498 |
1638400 |
|
1600 |
55195211 |
dragonliulong |
C |
June 6, 2019, 8:12 a.m. |
OK |
MS C++ 2017 |
TESTS |
17 |
1091 |
819200 |
|
1600 |
55201427 |
babin74 |
C |
June 6, 2019, 10:45 a.m. |
OK |
Node.js |
TESTS |
17 |
1981 |
53657600 |
|
1600 |
55172919 |
CyberGoose |
C |
June 5, 2019, 5:31 p.m. |
OK |
Ocaml |
TESTS |
17 |
187 |
921600 |
|
1600 |
55185350 |
pajenegod |
C |
June 6, 2019, 3:01 a.m. |
OK |
PyPy 2 |
TESTS |
17 |
202 |
12800000 |
|
1600 |
55232178 |
drd93 |
C |
June 7, 2019, 6:22 a.m. |
OK |
PyPy 2 |
TESTS |
17 |
280 |
15155200 |
|
1600 |
55232282 |
drd93 |
C |
June 7, 2019, 6:25 a.m. |
OK |
PyPy 2 |
TESTS |
17 |
295 |
15155200 |
|
1600 |
55231983 |
drd93 |
C |
June 7, 2019, 6:14 a.m. |
OK |
PyPy 2 |
TESTS |
17 |
311 |
15155200 |
|
1600 |
55231576 |
drd93 |
C |
June 7, 2019, 5:59 a.m. |
OK |
PyPy 2 |
TESTS |
17 |
311 |
15257600 |
|
1600 |
55232023 |
drd93 |
C |
June 7, 2019, 6:16 a.m. |
OK |
PyPy 2 |
TESTS |
17 |
312 |
15155200 |
|
1600 |
57394998 |
shanu_im |
C |
July 20, 2019, 4:01 p.m. |
OK |
PyPy 2 |
TESTS |
17 |
327 |
18636800 |
|
1600 |
55231714 |
drd93 |
C |
June 7, 2019, 6:04 a.m. |
OK |
PyPy 2 |
TESTS |
17 |
343 |
15360000 |
|
1600 |
55191011 |
drd93 |
C |
June 6, 2019, 6:28 a.m. |
OK |
PyPy 2 |
TESTS |
17 |
374 |
16691200 |
|
1600 |
55185320 |
pajenegod |
C |
June 6, 2019, 3 a.m. |
OK |
PyPy 3 |
TESTS |
17 |
233 |
13004800 |
|
1600 |
55185292 |
pajenegod |
C |
June 6, 2019, 2:59 a.m. |
OK |
PyPy 3 |
TESTS |
17 |
264 |
12595200 |
|
1600 |
55185150 |
pajenegod |
C |
June 6, 2019, 2:53 a.m. |
OK |
PyPy 3 |
TESTS |
17 |
280 |
17305600 |
|
1600 |
55579559 |
yumtam |
C |
June 15, 2019, 5:39 a.m. |
OK |
PyPy 3 |
TESTS |
17 |
358 |
24371200 |
|
1600 |
55231660 |
nik-in-au |
C |
June 7, 2019, 6:02 a.m. |
OK |
PyPy 3 |
TESTS |
17 |
624 |
36966400 |
|
1600 |
55208713 |
wishcode |
C |
June 6, 2019, 1:41 p.m. |
OK |
PyPy 3 |
TESTS |
17 |
639 |
21299200 |
|
1600 |
55224943 |
nivan |
C |
June 6, 2019, 11:57 p.m. |
OK |
PyPy 3 |
TESTS |
17 |
654 |
17100800 |
|
1600 |
55176665 |
aberent |
C |
June 5, 2019, 7 p.m. |
OK |
PyPy 3 |
TESTS |
17 |
654 |
21299200 |
|
1600 |
55190361 |
Paixao |
C |
June 6, 2019, 6:11 a.m. |
OK |
PyPy 3 |
TESTS |
17 |
654 |
21401600 |
|
1600 |
55176622 |
aberent |
C |
June 5, 2019, 6:59 p.m. |
OK |
PyPy 3 |
TESTS |
17 |
670 |
21299200 |
|
1600 |
55186713 |
phoenix28 |
C |
June 6, 2019, 3:55 a.m. |
OK |
Python 2 |
TESTS |
17 |
1044 |
11059200 |
|
1600 |
55738421 |
soumyasarkar1998 |
C |
June 19, 2019, 6:01 a.m. |
OK |
Python 2 |
TESTS |
17 |
1076 |
11059200 |
|
1600 |
57100506 |
prabhath123 Ex0d1a |
C |
July 15, 2019, 1:36 p.m. |
OK |
Python 2 |
TESTS |
17 |
1091 |
11059200 |
|
1600 |
55183734 |
anshuman16423 |
C |
June 6, 2019, 1:46 a.m. |
OK |
Python 2 |
TESTS |
17 |
1169 |
11059200 |
|
1600 |
55849542 |
NIeves |
C |
June 21, 2019, 2:16 a.m. |
OK |
Python 2 |
TESTS |
17 |
1169 |
11264000 |
|
1600 |
55186750 |
phoenix28 |
C |
June 6, 2019, 3:57 a.m. |
OK |
Python 2 |
TESTS |
17 |
1263 |
10956800 |
|
1600 |
58856374 |
-Morass- |
C |
Aug. 15, 2019, 9:28 a.m. |
OK |
Python 2 |
TESTS |
17 |
1263 |
12902400 |
|
1600 |
55193655 |
tieros |
C |
June 6, 2019, 7:32 a.m. |
OK |
Python 3 |
TESTS |
17 |
670 |
16896000 |
|
1600 |
55505365 |
dodoru |
C |
June 12, 2019, 5:32 p.m. |
OK |
Python 3 |
TESTS |
17 |
779 |
16076800 |
|
1600 |
56494510 |
vhquang |
C |
July 4, 2019, 1:53 a.m. |
OK |
Python 3 |
TESTS |
17 |
982 |
15564800 |
|
1600 |
55318530 |
SalmonTimo |
C |
June 9, 2019, 1:56 a.m. |
OK |
Python 3 |
TESTS |
17 |
1013 |
20480000 |
|
1600 |
55172225 |
hyta4982 |
C |
June 5, 2019, 5:17 p.m. |
OK |
Python 3 |
TESTS |
17 |
1060 |
16486400 |
|
1600 |
56494371 |
vhquang |
C |
July 4, 2019, 1:47 a.m. |
OK |
Python 3 |
TESTS |
17 |
1153 |
15564800 |
|
1600 |
55386969 |
365050244 |
C |
June 10, 2019, 7:53 a.m. |
OK |
Python 3 |
TESTS |
17 |
1169 |
15974400 |
|
1600 |
61101071 |
chauhain |
C |
Sept. 23, 2019, 6:47 a.m. |
OK |
Python 3 |
TESTS |
17 |
1201 |
16384000 |
|
1600 |
55328039 |
IQ-less-than-zero |
C |
June 9, 2019, 9:17 a.m. |
OK |
Python 3 |
TESTS |
17 |
1216 |
16076800 |
|
1600 |
56285413 |
erickjohnross |
C |
June 29, 2019, 7:16 p.m. |
OK |
Python 3 |
TESTS |
17 |
1263 |
15564800 |
|
1600 |
67630813 |
gearjack |
C |
Dec. 26, 2019, 3:45 a.m. |
OK |
Rust |
TESTS |
17 |
93 |
11468800 |
|
1600 |
55864119 |
LowR |
C |
June 21, 2019, 11:10 a.m. |
OK |
Rust |
TESTS |
17 |
202 |
11059200 |
|
1600 |
55862263 |
LowR |
C |
June 21, 2019, 10:11 a.m. |
OK |
Rust |
TESTS |
17 |
202 |
11059200 |
|
1600 |
56783981 |
fanzhang |
C |
July 10, 2019, 7:33 a.m. |
OK |
Rust |
TESTS |
17 |
1965 |
7065600 |
|
1600 |
remove filters
Back to search problems