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 |
643
|
VK Cup 2016 - Round 3 |
FINISHED |
False |
10800 |
269189699 |
May 7, 2016, 3:05 p.m. |
Problems
B"Bear Limak has n colored balls, arranged in one long row. Balls are numbered 1 through n, from left to right. There are n possible colors, also numbered 1 through n. The i-th ball has color ti. For a fixed interval (set of consecutive elements) of balls we can define a dominant color. It's a color occurring the biggest number of times in the interval. In case of a tie between some colors, the one with the smallest number (index) is chosen as dominant. There are non-empty intervals in total. For each color, your task is to count the number of intervals in which this color is dominant. 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 x895000) -- the number of balls. The second line contains n integers t1, xe2 x80 x89t2, xe2 x80 x89..., xe2 x80 x89tn (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ti xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) where ti is the color of the i-th ball. Print n integers. The i-th of them should be equal to the number of intervals where i is a dominant color. In the first sample, color 2 is dominant in three intervals: There are 7 more intervals and color 1 is dominant in all of them. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
17814443 |
ez_zkj |
A |
May 9, 2016, 12:41 a.m. |
OK |
FPC |
TESTS |
35 |
124 |
1843200 |
|
1500 |
19065543 |
totsamyzed |
A |
July 13, 2016, 6:51 a.m. |
OK |
FPC |
TESTS |
35 |
171 |
102400 |
|
1500 |
17809956 |
Sanja |
A |
May 8, 2016, 3:49 p.m. |
OK |
FPC |
TESTS |
35 |
202 |
1843200 |
|
1500 |
20351059 |
liaoliao |
A |
Sept. 3, 2016, 2:02 a.m. |
OK |
GNU C++ |
TESTS |
35 |
46 |
0 |
|
1500 |
21986495 |
moldi |
A |
Nov. 2, 2016, 9:09 a.m. |
OK |
GNU C++ |
TESTS |
35 |
46 |
0 |
|
1500 |
19539693 |
SpoonsAN |
A |
July 31, 2016, 2:11 p.m. |
OK |
GNU C++ |
TESTS |
35 |
46 |
102400 |
|
1500 |
19426891 |
vjudge1 |
A |
July 26, 2016, 5:09 p.m. |
OK |
GNU C++ |
TESTS |
35 |
46 |
102400 |
|
1500 |
18863582 |
black_horse2014 |
A |
July 3, 2016, 6:18 a.m. |
OK |
GNU C++ |
TESTS |
35 |
46 |
102400 |
|
1500 |
18863673 |
kut_kjb1994 |
A |
July 3, 2016, 6:27 a.m. |
OK |
GNU C++ |
TESTS |
35 |
46 |
1740800 |
|
1500 |
29483783 |
vjudge3 |
A |
Aug. 15, 2017, 2:25 p.m. |
OK |
GNU C++ |
TESTS |
35 |
46 |
2150400 |
|
1500 |
29483543 |
vjudge5 |
A |
Aug. 15, 2017, 2:13 p.m. |
OK |
GNU C++ |
TESTS |
35 |
46 |
2150400 |
|
1500 |
25558683 |
Turbat |
A |
March 16, 2017, 7:27 p.m. |
OK |
GNU C++ |
TESTS |
35 |
46 |
2150400 |
|
1500 |
25442752 |
eddy101 |
A |
March 12, 2017, 8:08 p.m. |
OK |
GNU C++ |
TESTS |
35 |
46 |
2150400 |
|
1500 |
17800719 |
stant |
A |
May 8, 2016, 12:52 a.m. |
OK |
GNU C11 |
TESTS |
35 |
420 |
102502400 |
|
1500 |
19321518 |
vjudge4 |
A |
July 22, 2016, 10:17 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
46 |
0 |
|
1500 |
19325849 |
ascchrvalstr |
A |
July 22, 2016, 2:09 p.m. |
OK |
GNU C++11 |
TESTS |
35 |
46 |
0 |
|
1500 |
20374456 |
aias |
A |
Sept. 4, 2016, 4:24 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
46 |
102400 |
|
1500 |
19433174 |
ssavi |
A |
July 27, 2016, 4:05 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
46 |
102400 |
|
1500 |
32536870 |
cvele |
A |
Nov. 21, 2017, 10:15 p.m. |
OK |
GNU C++11 |
TESTS |
35 |
46 |
102400 |
|
1500 |
20080607 |
y_shindoh |
A |
Aug. 23, 2016, 8:13 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
46 |
1945600 |
|
1500 |
20194379 |
ketly Alesom mdallrosa |
A |
Aug. 27, 2016, 11:59 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
46 |
1945600 |
|
1500 |
21428530 |
Abdelrahman_Radwan |
A |
Oct. 14, 2016, 4:56 p.m. |
OK |
GNU C++11 |
TESTS |
35 |
46 |
2150400 |
|
1500 |
21369827 |
higazy |
A |
Oct. 11, 2016, 9:03 p.m. |
OK |
GNU C++11 |
TESTS |
35 |
46 |
2150400 |
|
1500 |
29277609 |
a1s3a |
A |
Aug. 8, 2017, 4:49 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
46 |
2150400 |
|
1500 |
22097396 |
after |
A |
Nov. 7, 2016, 3:38 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
46 |
0 |
|
1500 |
27620411 |
OmarAhmed |
A |
June 6, 2017, 7:06 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
46 |
102400 |
|
1500 |
22506026 |
sumon23 |
A |
Nov. 26, 2016, 10:18 a.m. |
OK |
GNU C++14 |
TESTS |
35 |
46 |
102400 |
|
1500 |
21119658 |
vjudge4 |
A |
Oct. 2, 2016, 4:11 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
46 |
102400 |
|
1500 |
20475133 |
yongwhan |
A |
Sept. 9, 2016, 9:12 a.m. |
OK |
GNU C++14 |
TESTS |
35 |
46 |
102400 |
|
1500 |
20353931 |
Indecchi |
A |
Sept. 3, 2016, 6:23 a.m. |
OK |
GNU C++14 |
TESTS |
35 |
46 |
102400 |
|
1500 |
40394481 |
mia_ortizma |
A |
July 16, 2018, 4 a.m. |
OK |
GNU C++14 |
TESTS |
35 |
46 |
102400 |
|
1500 |
32325256 |
NiroBC |
A |
Nov. 15, 2017, 6:21 a.m. |
OK |
GNU C++14 |
TESTS |
35 |
46 |
204800 |
|
1500 |
35339695 |
nimom |
A |
Feb. 16, 2018, 2:03 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
46 |
1945600 |
|
1500 |
34054653 |
toxzi |
A |
Jan. 9, 2018, 5:19 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
46 |
1945600 |
|
1500 |
56876623 |
srijon09pal |
A |
July 12, 2019, 8:33 a.m. |
OK |
GNU C++17 |
TESTS |
35 |
62 |
102400 |
|
1500 |
69155605 |
Recursiv7AG |
A |
Jan. 19, 2020, 7:21 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
62 |
102400 |
|
1500 |
46510344 |
ivan100sic |
A |
Dec. 2, 2018, 12:59 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
62 |
102400 |
|
1500 |
51991318 |
cyansea |
A |
March 29, 2019, 8:19 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
77 |
102400 |
|
1500 |
67647100 |
Legend117 |
A |
Dec. 26, 2019, 10:37 a.m. |
OK |
GNU C++17 |
TESTS |
35 |
78 |
102400 |
|
1500 |
68886048 |
Tanvir_Rasel |
A |
Jan. 15, 2020, 9:30 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
78 |
102400 |
|
1500 |
67615100 |
cheaterman |
A |
Dec. 25, 2019, 4:54 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
78 |
102400 |
|
1500 |
62230305 |
BabaYaga42 |
A |
Oct. 9, 2019, 8:23 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
78 |
102400 |
|
1500 |
60709564 |
ReReRERE |
A |
Sept. 17, 2019, 7:28 a.m. |
OK |
GNU C++17 |
TESTS |
35 |
78 |
102400 |
|
1500 |
46980191 |
davidcairuz |
A |
Dec. 13, 2018, 7:14 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
78 |
102400 |
|
1500 |
17793413 |
slava.sh |
A |
May 7, 2016, 4:53 p.m. |
OK |
Go |
TESTS |
35 |
1138 |
6246400 |
|
1500 |
65887923 |
darren_yao |
A |
Nov. 28, 2019, 12:59 a.m. |
OK |
Java 8 |
TESTS |
35 |
202 |
0 |
|
1500 |
17782793 |
Musin NikitaMikhaylov |
A |
May 7, 2016, 3:18 p.m. |
OK |
Java 8 |
TESTS |
35 |
202 |
20480000 |
|
1500 |
38616332 |
ShowStopper728 |
A |
May 25, 2018, 6:45 p.m. |
OK |
Java 8 |
TESTS |
35 |
217 |
0 |
|
1500 |
17780992 |
antonkov Yurik |
A |
May 7, 2016, 3:11 p.m. |
OK |
Java 8 |
TESTS |
35 |
217 |
20480000 |
|
1500 |
17896033 |
Togrul_Gasimov |
A |
May 13, 2016, 11:31 p.m. |
OK |
Java 8 |
TESTS |
35 |
217 |
20582400 |
|
1500 |
18501891 |
WiNDWAY |
A |
June 15, 2016, 4:16 p.m. |
OK |
Java 8 |
TESTS |
35 |
217 |
20787200 |
|
1500 |
69876324 |
pavandhage10 |
A |
Jan. 31, 2020, 4:14 a.m. |
OK |
Java 8 |
TESTS |
35 |
218 |
0 |
|
1500 |
17780177 |
VArtem |
A |
May 7, 2016, 3:08 p.m. |
OK |
Java 8 |
TESTS |
35 |
218 |
20480000 |
|
1500 |
18029893 |
Qwert2603 |
A |
May 22, 2016, 10:18 a.m. |
OK |
Java 8 |
TESTS |
35 |
218 |
20684800 |
|
1500 |
69893657 |
pavandhage10 |
A |
Jan. 31, 2020, 10:59 a.m. |
OK |
Java 8 |
TESTS |
35 |
233 |
0 |
|
1500 |
17904094 |
zazak |
A |
May 14, 2016, 10:27 a.m. |
OK |
MS C# |
TESTS |
35 |
186 |
9728000 |
|
1500 |
17783667 |
chiyar MrKaStep |
A |
May 7, 2016, 3:22 p.m. |
OK |
MS C++ |
TESTS |
35 |
62 |
2252800 |
|
1500 |
24569615 |
Yurik |
A |
Feb. 10, 2017, 12:44 p.m. |
OK |
MS C++ |
TESTS |
35 |
77 |
2150400 |
|
1500 |
18152353 |
rkm0959 |
A |
May 30, 2016, 2:15 a.m. |
OK |
MS C++ |
TESTS |
35 |
77 |
2252800 |
|
1500 |
18902135 |
hubert322 |
A |
July 5, 2016, 1:58 p.m. |
OK |
MS C++ |
TESTS |
35 |
78 |
102400 |
|
1500 |
17782132 |
CleRIC NVAL |
A |
May 7, 2016, 3:15 p.m. |
OK |
MS C++ |
TESTS |
35 |
78 |
2150400 |
|
1500 |
17780792 |
TonySnark |
A |
May 7, 2016, 3:10 p.m. |
OK |
MS C++ |
TESTS |
35 |
78 |
2150400 |
|
1500 |
17999908 |
scorpiowf |
A |
May 20, 2016, 5:35 a.m. |
OK |
MS C++ |
TESTS |
35 |
78 |
2252800 |
|
1500 |
17814384 |
jkrs |
A |
May 9, 2016, 12:30 a.m. |
OK |
MS C++ |
TESTS |
35 |
78 |
2252800 |
|
1500 |
17780933 |
k1nval NutZ |
A |
May 7, 2016, 3:11 p.m. |
OK |
MS C++ |
TESTS |
35 |
78 |
10137600 |
|
1500 |
18968674 |
Anaar |
A |
July 8, 2016, 11:48 a.m. |
OK |
MS C++ |
TESTS |
35 |
93 |
102400 |
|
1500 |
18064046 |
nealzane |
A |
May 24, 2016, 8:53 p.m. |
OK |
PyPy 2 |
TESTS |
35 |
530 |
28467200 |
|
1500 |
22869800 |
franckmy |
A |
Dec. 11, 2016, 3:49 a.m. |
OK |
PyPy 2 |
TESTS |
35 |
561 |
5529600 |
|
1500 |
17798273 |
rek |
A |
May 7, 2016, 7:21 p.m. |
OK |
PyPy 2 |
TESTS |
35 |
576 |
29491200 |
|
1500 |
69063785 |
kchau |
A |
Jan. 18, 2020, 5:42 p.m. |
OK |
PyPy 3 |
TESTS |
35 |
327 |
7884800 |
|
1500 |
35887039 |
______M______ |
A |
March 3, 2018, 1:57 p.m. |
OK |
PyPy 3 |
TESTS |
35 |
358 |
28364800 |
|
1500 |
32898349 |
yugle7 |
A |
Dec. 3, 2017, 12:05 p.m. |
OK |
PyPy 3 |
TESTS |
35 |
405 |
29900800 |
|
1500 |
20482841 |
Remarque |
A |
Sept. 9, 2016, 4:57 p.m. |
OK |
PyPy 3 |
TESTS |
35 |
498 |
7372800 |
|
1500 |
57704137 |
kopok2 |
A |
July 24, 2019, 7:07 p.m. |
OK |
PyPy 3 |
TESTS |
35 |
514 |
9830400 |
|
1500 |
19678168 |
Amores |
A |
Aug. 7, 2016, 12:11 a.m. |
OK |
PyPy 3 |
TESTS |
35 |
1122 |
30720000 |
|
1500 |
21789061 |
reldan |
A |
Oct. 26, 2016, 7:44 a.m. |
OK |
Scala |
TESTS |
35 |
514 |
0 |
|
1500 |
remove filters
Back to search problems