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'Programmer Sasha has recently begun to study data structures. His coach Stas told him to solve the problem of finding a minimum on the segment of the array in , which Sasha coped with. For Sasha not to think that he had learned all, Stas gave him a new task. For each segment of the fixed length Sasha must find the maximum element of those that occur on the given segment exactly once. Help Sasha solve this problem. The first line contains two positive integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the number of array elements and the length of the segment. Then follow n lines: the i-th one contains a single number ai ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). Print n xe2 x80 x93k xe2 x80 x89+ xe2 x80 x891 numbers, one per line: on the i-th line print of the maximum number of those numbers from the subarray ai ai xe2 x80 x89+ xe2 x80 x891 xe2 x80 xa6 ai xe2 x80 x89+ xe2 x80 x89k xe2 x80 x89- xe2 x80 x891 that occur in this subarray exactly 1 time. If there are no such numbers in this subarray, print "Nothing".'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
38110324 |
cpy |
E |
May 11, 2018, 9:48 a.m. |
OK |
D |
TESTS |
49 |
124 |
16486400 |
|
1800 |
40512960 |
cpy |
E |
July 18, 2018, noon |
OK |
D |
TESTS |
49 |
155 |
11776000 |
|
1800 |
40992942 |
ReaLNero1 |
E |
July 31, 2018, 1:40 a.m. |
OK |
GNU C++ |
TESTS |
49 |
78 |
2457600 |
|
1800 |
34413036 |
vjudge3 |
E |
Jan. 21, 2018, 12:10 p.m. |
OK |
GNU C++ |
TESTS |
49 |
109 |
8601600 |
|
1800 |
34406636 |
vjudge4 |
E |
Jan. 21, 2018, 8:50 a.m. |
OK |
GNU C++ |
TESTS |
49 |
124 |
7577600 |
|
1800 |
34430552 |
vjudge1 |
E |
Jan. 22, 2018, 3:12 a.m. |
OK |
GNU C++ |
TESTS |
49 |
140 |
6041600 |
|
1800 |
34429306 |
vjudge5 |
E |
Jan. 22, 2018, 2:09 a.m. |
OK |
GNU C++ |
TESTS |
49 |
156 |
6963200 |
|
1800 |
33975007 |
SamuelT |
E |
Jan. 7, 2018, 2:05 a.m. |
OK |
GNU C++ |
TESTS |
49 |
187 |
5427200 |
|
1800 |
34406678 |
vjudge3 |
E |
Jan. 21, 2018, 8:51 a.m. |
OK |
GNU C++ |
TESTS |
49 |
218 |
9318400 |
|
1800 |
40908236 |
GUANZEYING |
E |
July 29, 2018, 7:10 a.m. |
OK |
GNU C++ |
TESTS |
49 |
249 |
3584000 |
|
1800 |
34430647 |
vjudge2 |
E |
Jan. 22, 2018, 3:16 a.m. |
OK |
GNU C++ |
TESTS |
49 |
358 |
5529600 |
|
1800 |
36557385 |
SAeed |
E |
March 23, 2018, 10:21 p.m. |
OK |
GNU C++ |
TESTS |
49 |
389 |
6963200 |
|
1800 |
59370894 |
rainboy |
E |
Aug. 23, 2019, 7:05 p.m. |
OK |
GNU C11 |
TESTS |
49 |
421 |
2457600 |
|
1800 |
43010776 |
Jhamra |
E |
Sept. 17, 2018, 6:27 p.m. |
OK |
GNU C++11 |
TESTS |
49 |
93 |
3276800 |
|
1800 |
45684833 |
ShafinKhadem |
E |
Nov. 13, 2018, 5:29 p.m. |
OK |
GNU C++11 |
TESTS |
49 |
109 |
3379200 |
|
1800 |
45684852 |
NRK7 |
E |
Nov. 13, 2018, 5:30 p.m. |
OK |
GNU C++11 |
TESTS |
49 |
109 |
3379200 |
|
1800 |
63333332 |
tripPple_A |
E |
Oct. 24, 2019, 4:44 p.m. |
OK |
GNU C++11 |
TESTS |
49 |
109 |
3481600 |
|
1800 |
67475985 |
vjudge4 |
E |
Dec. 23, 2019, 2:23 p.m. |
OK |
GNU C++11 |
TESTS |
49 |
124 |
2662400 |
|
1800 |
44588739 |
Drummer3 |
E |
Oct. 20, 2018, 10:24 a.m. |
OK |
GNU C++11 |
TESTS |
49 |
124 |
3481600 |
|
1800 |
42256356 |
CLown1331 |
E |
Aug. 29, 2018, 9:38 p.m. |
OK |
GNU C++11 |
TESTS |
49 |
124 |
3788800 |
|
1800 |
51362338 |
cprogrammer |
E |
March 16, 2019, 7:54 a.m. |
OK |
GNU C++11 |
TESTS |
49 |
124 |
3788800 |
|
1800 |
53124427 |
WhYnOtmE_ljq |
E |
April 22, 2019, 1:06 p.m. |
OK |
GNU C++11 |
TESTS |
49 |
124 |
4403200 |
|
1800 |
57379556 |
BASSEL_- |
E |
July 20, 2019, 2:01 p.m. |
OK |
GNU C++11 |
TESTS |
49 |
124 |
4608000 |
|
1800 |
63909283 |
yogeshk972 |
E |
Oct. 31, 2019, 7:40 a.m. |
OK |
GNU C++14 |
TESTS |
49 |
93 |
3891200 |
|
1800 |
56257701 |
tejasp919 |
E |
June 29, 2019, 6:47 a.m. |
OK |
GNU C++14 |
TESTS |
49 |
93 |
5529600 |
|
1800 |
34290399 |
ArlanKuralbayev |
E |
Jan. 19, 2018, 3:14 a.m. |
OK |
GNU C++14 |
TESTS |
49 |
93 |
5836800 |
|
1800 |
36440438 |
aneesh2312 |
E |
March 20, 2018, 6:40 p.m. |
OK |
GNU C++14 |
TESTS |
49 |
93 |
8396800 |
|
1800 |
46563831 |
XsliferX |
E |
Dec. 3, 2018, 8:25 p.m. |
OK |
GNU C++14 |
TESTS |
49 |
108 |
3891200 |
|
1800 |
46366677 |
RedDreamer |
E |
Nov. 29, 2018, 1:35 p.m. |
OK |
GNU C++14 |
TESTS |
49 |
108 |
3891200 |
|
1800 |
34536496 |
HardNut |
E |
Jan. 25, 2018, 5:44 a.m. |
OK |
GNU C++14 |
TESTS |
49 |
108 |
5427200 |
|
1800 |
40380370 |
gur_chella |
E |
July 15, 2018, 1:43 p.m. |
OK |
GNU C++14 |
TESTS |
49 |
108 |
7475200 |
|
1800 |
41993676 |
toxzi |
E |
Aug. 23, 2018, 10:38 a.m. |
OK |
GNU C++14 |
TESTS |
49 |
109 |
3379200 |
|
1800 |
40829932 |
LODB---D |
E |
July 27, 2018, 5:18 a.m. |
OK |
GNU C++14 |
TESTS |
49 |
109 |
3891200 |
|
1800 |
58151621 |
-273c |
E |
Aug. 2, 2019, 2:57 a.m. |
OK |
GNU C++17 |
TESTS |
49 |
78 |
2457600 |
|
1800 |
44429803 |
madhur4127 |
E |
Oct. 17, 2018, 7:02 a.m. |
OK |
GNU C++17 |
TESTS |
49 |
93 |
3379200 |
|
1800 |
44468747 |
ruslanjan |
E |
Oct. 18, 2018, 4:47 a.m. |
OK |
GNU C++17 |
TESTS |
49 |
108 |
3379200 |
|
1800 |
46567082 |
umarshakil123 |
E |
Dec. 4, 2018, 1:16 a.m. |
OK |
GNU C++17 |
TESTS |
49 |
108 |
5632000 |
|
1800 |
38892502 |
cai_lw |
E |
June 2, 2018, 1:37 p.m. |
OK |
GNU C++17 |
TESTS |
49 |
108 |
6963200 |
|
1800 |
59936713 |
Eran |
E |
Sept. 3, 2019, 9:47 a.m. |
OK |
GNU C++17 |
TESTS |
49 |
108 |
7270400 |
|
1800 |
55744399 |
Ajax |
E |
June 19, 2019, 9:13 a.m. |
OK |
GNU C++17 |
TESTS |
49 |
109 |
3481600 |
|
1800 |
66781471 |
srv_twry |
E |
Dec. 13, 2019, 12:11 p.m. |
OK |
GNU C++17 |
TESTS |
49 |
109 |
3584000 |
|
1800 |
56843032 |
Mohd. |
E |
July 11, 2019, 12:22 p.m. |
OK |
GNU C++17 |
TESTS |
49 |
109 |
3584000 |
|
1800 |
48030379 |
pavkal5 |
E |
Jan. 6, 2019, noon |
OK |
GNU C++17 |
TESTS |
49 |
109 |
3584000 |
|
1800 |
65826912 |
its_aks_ulure |
E |
Nov. 27, 2019, 12:54 p.m. |
OK |
Java 11 |
TESTS |
49 |
343 |
2457600 |
|
1800 |
52341960 |
amolpratap007 |
E |
April 5, 2019, 10:58 a.m. |
OK |
Java 8 |
TESTS |
49 |
217 |
819200 |
|
1800 |
59538805 |
kocko |
E |
Aug. 26, 2019, 6 p.m. |
OK |
Java 8 |
TESTS |
49 |
248 |
0 |
|
1800 |
49904687 |
xodiac |
E |
Feb. 14, 2019, 11:22 a.m. |
OK |
Java 8 |
TESTS |
49 |
249 |
1024000 |
|
1800 |
46884663 |
DropKeBaadNirma |
E |
Dec. 10, 2018, 10:09 p.m. |
OK |
Java 8 |
TESTS |
49 |
249 |
1228800 |
|
1800 |
57946777 |
YahiaMostafa |
E |
July 29, 2019, 2:40 p.m. |
OK |
Java 8 |
TESTS |
49 |
249 |
1331200 |
|
1800 |
44719122 |
omarnvidia |
E |
Oct. 23, 2018, 2:23 a.m. |
OK |
Java 8 |
TESTS |
49 |
264 |
0 |
|
1800 |
57929330 |
MahmoudJobeel |
E |
July 29, 2019, 8:11 a.m. |
OK |
Java 8 |
TESTS |
49 |
265 |
307200 |
|
1800 |
57823655 |
nadaabdo588 |
E |
July 27, 2019, 1:34 a.m. |
OK |
Java 8 |
TESTS |
49 |
280 |
0 |
|
1800 |
39527114 |
ZeyadKhattab |
E |
June 22, 2018, 8:09 p.m. |
OK |
Java 8 |
TESTS |
49 |
280 |
0 |
|
1800 |
39321349 |
flyman3046 |
E |
June 17, 2018, 12:04 a.m. |
OK |
Java 8 |
TESTS |
49 |
280 |
819200 |
|
1800 |
42836599 |
2017401349fei |
E |
Sept. 13, 2018, 3:58 p.m. |
OK |
MS C++ |
TESTS |
49 |
155 |
4403200 |
|
1800 |
51399548 |
MikuSakula |
E |
March 17, 2019, 6:35 a.m. |
OK |
MS C++ |
TESTS |
49 |
576 |
11264000 |
|
1800 |
33465470 |
yugle7 |
E |
Dec. 20, 2017, 8:09 p.m. |
OK |
Python 3 |
TESTS |
49 |
873 |
17305600 |
|
1800 |
33465056 |
yugle7 |
E |
Dec. 20, 2017, 7:43 p.m. |
OK |
Python 3 |
TESTS |
49 |
888 |
16179200 |
|
1800 |
33465549 |
yugle7 |
E |
Dec. 20, 2017, 8:15 p.m. |
OK |
Python 3 |
TESTS |
49 |
935 |
17305600 |
|
1800 |
33208950 |
ditsing |
E |
Dec. 13, 2017, 9:54 a.m. |
OK |
Rust |
TESTS |
49 |
686 |
4710400 |
|
1800 |
remove filters
Back to search problems