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"Define the simple skewness of a collection of numbers to be the collection's mean minus its median. You are given a list of n (not necessarily distinct) integers. Find the non-empty subset (with repetition) with the maximum simple skewness. The mean of a collection is the average of its elements. The median of a collection is its middle element when all of its elements are sorted, or the average of its two middle elements if it has even size. The first line of the input contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200 000) -- the number of elements in the list. The second line contains n integers xi (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891 xe2 x80 x89000 xe2 x80 x89000) -- the ith element of the list. In the first line, print a single integer k -- the size of the subset. In the second line, print k integers -- the elements of the subset in any order. If there are multiple optimal subsets, print any. In the first case, the optimal subset is , which has mean 5, median 2, and simple skewness of 5 xe2 x80 x89- xe2 x80 x892 xe2 x80 x89= xe2 x80 x893. In the second case, the optimal subset is . Note that repetition is allowed. In the last case, any subset has the same median and mean, so all have simple skewness of 0."... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
24352073 |
Gray_58 |
E |
Feb. 1, 2017, 6:21 p.m. |
OK |
FPC |
TESTS |
94 |
576 |
6758400 |
|
2400 |
16036871 |
igdor99 |
E |
Feb. 15, 2016, 4:54 p.m. |
OK |
FPC |
TESTS |
94 |
670 |
3686400 |
|
2400 |
16053066 |
Astreb |
E |
Feb. 16, 2016, 9 a.m. |
OK |
FPC |
TESTS |
94 |
857 |
3379200 |
|
2400 |
16003952 |
NanoApe |
E |
Feb. 13, 2016, 7:23 p.m. |
OK |
GNU C++ |
TESTS |
94 |
78 |
819200 |
|
2400 |
16032191 |
squee_spoon |
E |
Feb. 15, 2016, 11:58 a.m. |
OK |
GNU C++ |
TESTS |
94 |
93 |
819200 |
|
2400 |
16032069 |
squee_spoon |
E |
Feb. 15, 2016, 11:52 a.m. |
OK |
GNU C++ |
TESTS |
94 |
93 |
819200 |
|
2400 |
18910981 |
AkaneSasu |
E |
July 6, 2016, 3:47 a.m. |
OK |
GNU C++ |
TESTS |
94 |
93 |
2252800 |
|
2400 |
22156625 |
1234567890 |
E |
Nov. 11, 2016, 1:12 a.m. |
OK |
GNU C++ |
TESTS |
94 |
93 |
2457600 |
|
2400 |
16005412 |
gxnncrx1993 |
E |
Feb. 13, 2016, 7:40 p.m. |
OK |
GNU C++ |
TESTS |
94 |
93 |
2662400 |
|
2400 |
17179530 |
Arturia |
E |
April 6, 2016, 2:35 a.m. |
OK |
GNU C++ |
TESTS |
94 |
93 |
4403200 |
|
2400 |
16034188 |
squee_spoon |
E |
Feb. 15, 2016, 2:10 p.m. |
OK |
GNU C++ |
TESTS |
94 |
93 |
4812800 |
|
2400 |
16004105 |
pparys |
E |
Feb. 13, 2016, 7:25 p.m. |
OK |
GNU C++ |
TESTS |
94 |
108 |
1228800 |
|
2400 |
16018845 |
sfiction |
E |
Feb. 14, 2016, 2 p.m. |
OK |
GNU C++ |
TESTS |
94 |
108 |
2252800 |
|
2400 |
16302352 |
DeepDarkFantasy |
E |
Feb. 24, 2016, 3:10 a.m. |
OK |
GNU C++11 |
TESTS |
94 |
78 |
2457600 |
|
2400 |
16000287 |
LHiC |
E |
Feb. 13, 2016, 6:43 p.m. |
OK |
GNU C++11 |
TESTS |
94 |
93 |
1228800 |
|
2400 |
16004824 |
albert96 |
E |
Feb. 13, 2016, 7:33 p.m. |
OK |
GNU C++11 |
TESTS |
94 |
93 |
2355200 |
|
2400 |
40985174 |
ReaLNero1 |
E |
July 30, 2018, 7:47 p.m. |
OK |
GNU C++11 |
TESTS |
94 |
93 |
2457600 |
|
2400 |
16015405 |
aditya1495 |
E |
Feb. 14, 2016, 9:12 a.m. |
OK |
GNU C++11 |
TESTS |
94 |
93 |
2457600 |
|
2400 |
44654910 |
luogu_bot5 |
E |
Oct. 21, 2018, 12:40 p.m. |
OK |
GNU C++11 |
TESTS |
94 |
93 |
3072000 |
|
2400 |
30453189 |
RNS_CUS |
E |
Sept. 18, 2017, 1:44 a.m. |
OK |
GNU C++11 |
TESTS |
94 |
93 |
3276800 |
|
2400 |
16273922 |
huicpc0807 |
E |
Feb. 22, 2016, 9:07 a.m. |
OK |
GNU C++11 |
TESTS |
94 |
108 |
819200 |
|
2400 |
16014736 |
LHiC |
E |
Feb. 14, 2016, 8:20 a.m. |
OK |
GNU C++11 |
TESTS |
94 |
109 |
1228800 |
|
2400 |
16044791 |
lavin |
E |
Feb. 16, 2016, 3:39 a.m. |
OK |
GNU C++11 |
TESTS |
94 |
109 |
2252800 |
|
2400 |
29479222 |
byeongkeunahn |
E |
Aug. 15, 2017, 10:54 a.m. |
OK |
GNU C++14 |
TESTS |
94 |
93 |
4608000 |
|
2400 |
30453161 |
RNS_CUS |
E |
Sept. 18, 2017, 1:41 a.m. |
OK |
GNU C++14 |
TESTS |
94 |
109 |
3174400 |
|
2400 |
48985211 |
RobeZH |
E |
Jan. 26, 2019, 12:01 p.m. |
OK |
GNU C++14 |
TESTS |
94 |
109 |
3993600 |
|
2400 |
54871445 |
ae04071 |
E |
May 31, 2019, 9:27 a.m. |
OK |
GNU C++14 |
TESTS |
94 |
124 |
1638400 |
|
2400 |
48855093 |
LODB---D |
E |
Jan. 23, 2019, 6:33 p.m. |
OK |
GNU C++14 |
TESTS |
94 |
124 |
3174400 |
|
2400 |
30453612 |
RNS3 |
E |
Sept. 18, 2017, 2:22 a.m. |
OK |
GNU C++14 |
TESTS |
94 |
124 |
4403200 |
|
2400 |
30453584 |
RNS3 |
E |
Sept. 18, 2017, 2:20 a.m. |
OK |
GNU C++14 |
TESTS |
94 |
124 |
4403200 |
|
2400 |
29128750 |
ahaoboy |
E |
Aug. 2, 2017, 11:47 a.m. |
OK |
GNU C++14 |
TESTS |
94 |
124 |
5120000 |
|
2400 |
55911329 |
naive_wcx |
E |
June 22, 2019, 2:17 a.m. |
OK |
GNU C++14 |
TESTS |
94 |
139 |
2457600 |
|
2400 |
55911311 |
vjudge1 |
E |
June 22, 2019, 2:16 a.m. |
OK |
GNU C++14 |
TESTS |
94 |
140 |
2457600 |
|
2400 |
64165039 |
Mai-sanBestWaifu |
E |
Nov. 3, 2019, 3:57 p.m. |
OK |
GNU C++17 |
TESTS |
94 |
124 |
3174400 |
|
2400 |
45393881 |
dpkun |
E |
Nov. 7, 2018, 1:37 a.m. |
OK |
GNU C++17 |
TESTS |
94 |
124 |
3174400 |
|
2400 |
65535253 |
huangyaxuan |
E |
Nov. 22, 2019, 1:55 p.m. |
OK |
GNU C++17 |
TESTS |
94 |
139 |
3481600 |
|
2400 |
44066522 |
NiceBaseballCoder |
E |
Oct. 10, 2018, 9:39 a.m. |
OK |
GNU C++17 |
TESTS |
94 |
139 |
3481600 |
|
2400 |
50762061 |
ivanilos |
E |
March 3, 2019, 8:05 p.m. |
OK |
GNU C++17 |
TESTS |
94 |
140 |
2355200 |
|
2400 |
65510315 |
tyzc |
E |
Nov. 22, 2019, 3:09 a.m. |
OK |
GNU C++17 |
TESTS |
94 |
155 |
3174400 |
|
2400 |
55819832 |
185217 |
E |
June 20, 2019, 8:02 a.m. |
OK |
GNU C++17 |
TESTS |
94 |
155 |
3174400 |
|
2400 |
50555788 |
HarryWu |
E |
Feb. 27, 2019, 7:53 a.m. |
OK |
GNU C++17 |
TESTS |
94 |
155 |
3174400 |
|
2400 |
65535744 |
huangyaxuan |
E |
Nov. 22, 2019, 2:05 p.m. |
OK |
GNU C++17 |
TESTS |
94 |
156 |
3174400 |
|
2400 |
67448810 |
meowmeow321 |
E |
Dec. 23, 2019, 1:47 a.m. |
OK |
GNU C++17 |
TESTS |
94 |
171 |
3993600 |
|
2400 |
16218169 |
Martynas |
E |
Feb. 20, 2016, 12:01 a.m. |
OK |
Go |
TESTS |
94 |
452 |
6553600 |
|
2400 |
16033403 |
baukaman |
E |
Feb. 15, 2016, 1:21 p.m. |
OK |
Java 7 |
TESTS |
94 |
296 |
2662400 |
|
2400 |
16341385 |
nitegazer |
E |
Feb. 26, 2016, 7:08 a.m. |
OK |
Java 7 |
TESTS |
94 |
467 |
5017600 |
|
2400 |
16341403 |
nitegazer |
E |
Feb. 26, 2016, 7:10 a.m. |
OK |
Java 7 |
TESTS |
94 |
483 |
5120000 |
|
2400 |
16002654 |
lucasr |
E |
Feb. 13, 2016, 7:08 p.m. |
OK |
Java 7 |
TESTS |
94 |
623 |
2252800 |
|
2400 |
16216052 |
toilingcow |
E |
Feb. 19, 2016, 8:35 p.m. |
OK |
Java 7 |
TESTS |
94 |
1496 |
204800 |
|
2400 |
16002871 |
winger |
E |
Feb. 13, 2016, 7:10 p.m. |
OK |
Java 7 |
TESTS |
94 |
1840 |
0 |
|
2400 |
16019311 |
harry.zhao |
E |
Feb. 14, 2016, 2:35 p.m. |
OK |
Java 8 |
TESTS |
94 |
249 |
1433600 |
|
2400 |
16005245 |
andrewzta |
E |
Feb. 13, 2016, 7:38 p.m. |
OK |
Java 8 |
TESTS |
94 |
264 |
1536000 |
|
2400 |
17389684 |
Deathlyhallows |
E |
April 19, 2016, 4:16 p.m. |
OK |
Java 8 |
TESTS |
94 |
265 |
26624000 |
|
2400 |
17389665 |
Deathlyhallows |
E |
April 19, 2016, 4:15 p.m. |
OK |
Java 8 |
TESTS |
94 |
295 |
26624000 |
|
2400 |
16003058 |
eatmore |
E |
Feb. 13, 2016, 7:12 p.m. |
OK |
Java 8 |
TESTS |
94 |
296 |
1536000 |
|
2400 |
15998850 |
Petr |
E |
Feb. 13, 2016, 6:30 p.m. |
OK |
Java 8 |
TESTS |
94 |
327 |
1740800 |
|
2400 |
16001769 |
Sinner |
E |
Feb. 13, 2016, 6:58 p.m. |
OK |
Java 8 |
TESTS |
94 |
358 |
1638400 |
|
2400 |
16021991 |
antonkov |
E |
Feb. 14, 2016, 6:04 p.m. |
OK |
Java 8 |
TESTS |
94 |
373 |
1433600 |
|
2400 |
16059843 |
dhrumil140396 |
E |
Feb. 16, 2016, 5:31 p.m. |
OK |
Java 8 |
TESTS |
94 |
405 |
0 |
|
2400 |
16009485 |
vsb |
E |
Feb. 13, 2016, 9:15 p.m. |
OK |
Java 8 |
TESTS |
94 |
421 |
0 |
|
2400 |
16037439 |
azukun |
E |
Feb. 15, 2016, 5:28 p.m. |
OK |
MS C# |
TESTS |
94 |
265 |
40038400 |
|
2400 |
16138531 |
AnatolyTolstobrov |
E |
Feb. 18, 2016, 8:52 a.m. |
OK |
MS C# |
TESTS |
94 |
342 |
17408000 |
|
2400 |
16595844 |
sister_what_hate_most |
E |
March 8, 2016, 5:35 a.m. |
OK |
MS C++ |
TESTS |
94 |
140 |
3174400 |
|
2400 |
16718317 |
AleksanderBalobanov |
E |
March 14, 2016, 4:44 p.m. |
OK |
MS C++ |
TESTS |
94 |
187 |
13414400 |
|
2400 |
16719072 |
LightRay |
E |
March 14, 2016, 5:32 p.m. |
OK |
MS C++ |
TESTS |
94 |
187 |
16076800 |
|
2400 |
16138717 |
arkahjp |
E |
Feb. 18, 2016, 9:09 a.m. |
OK |
MS C++ |
TESTS |
94 |
249 |
3276800 |
|
2400 |
16138712 |
a2d2 |
E |
Feb. 18, 2016, 9:08 a.m. |
OK |
MS C++ |
TESTS |
94 |
249 |
3276800 |
|
2400 |
16009205 |
bobrdobr |
E |
Feb. 13, 2016, 8:57 p.m. |
OK |
MS C++ |
TESTS |
94 |
280 |
819200 |
|
2400 |
16004382 |
Ilya_MSU |
E |
Feb. 13, 2016, 7:28 p.m. |
OK |
MS C++ |
TESTS |
94 |
312 |
3174400 |
|
2400 |
16141840 |
huantwofat |
E |
Feb. 18, 2016, 1:12 p.m. |
OK |
MS C++ |
TESTS |
94 |
374 |
2457600 |
|
2400 |
17256701 |
The_suspect |
E |
April 9, 2016, 7:47 p.m. |
OK |
MS C++ |
TESTS |
94 |
374 |
4608000 |
|
2400 |
16003713 |
Milanin |
E |
Feb. 13, 2016, 7:20 p.m. |
OK |
MS C++ |
TESTS |
94 |
420 |
3174400 |
|
2400 |
16011422 |
Darooha |
E |
Feb. 14, 2016, 1:52 a.m. |
OK |
Ocaml |
TESTS |
94 |
1060 |
9420800 |
|
2400 |
16017514 |
cugel |
E |
Feb. 14, 2016, 12:10 p.m. |
OK |
PyPy 3 |
TESTS |
94 |
2558 |
35020800 |
|
2400 |
remove filters
Back to search problems