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
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
( 466 ) |
G |
Chattering |
PROGRAMMING |
|
|
2700 |
B'There are n parrots standing in a circle. Each parrot has a certain level of respect among other parrots, namely r_i . When a parrot with respect level x starts chattering, x neighbours to the right and to the left of it start repeating the same words in 1 second. Their neighbours then start repeating as well, and so on, until all the birds begin to chatter. You are given the respect levels of all parrots. For each parrot answer a question: if this certain parrot starts chattering, how many seconds will pass until all other birds will start repeating it? In the first line of input there is a single integer n , the number of parrots ( 1 <= q n <= q 10^5 ). In the next line of input there are n integers r_1 , ..., r_n , the respect levels of parrots in order they stand in the circle ( 1 <= q r_i <= q n ). Print n integers. i -th of them should equal the number of seconds that is needed for all parrots to start chattering if the i -th parrot is the first to start. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
57737422 |
py_ultron |
G |
July 25, 2019, 10:22 a.m. |
OK |
GNU C++11 |
TESTS |
50 |
358 |
231628800 |
|
2700 |
57868761 |
lopare |
G |
July 27, 2019, 11:37 p.m. |
OK |
GNU C++11 |
TESTS |
50 |
374 |
231628800 |
|
2700 |
46053253 |
CrazyTeaMajor |
G |
Nov. 22, 2018, 9:15 a.m. |
OK |
GNU C++11 |
TESTS |
50 |
935 |
241459200 |
|
2700 |
46013747 |
jarvis11 |
G |
Nov. 20, 2018, 11:28 p.m. |
OK |
GNU C++11 |
TESTS |
50 |
1044 |
64921600 |
|
2700 |
54947917 |
chhokmah |
G |
June 1, 2019, 5:05 p.m. |
OK |
GNU C++11 |
TESTS |
50 |
1153 |
226099200 |
|
2700 |
63245993 |
Nazrin |
G |
Oct. 23, 2019, 2:40 p.m. |
OK |
GNU C++11 |
TESTS |
50 |
1153 |
241664000 |
|
2700 |
46013695 |
jarvis11 |
G |
Nov. 20, 2018, 11:22 p.m. |
OK |
GNU C++11 |
TESTS |
50 |
1169 |
84992000 |
|
2700 |
47517113 |
guille |
G |
Dec. 26, 2018, 10:41 a.m. |
OK |
GNU C++11 |
TESTS |
50 |
1216 |
176537600 |
|
2700 |
48197276 |
Winniechen |
G |
Jan. 11, 2019, 12:30 a.m. |
OK |
GNU C++11 |
TESTS |
50 |
1387 |
217600000 |
|
2700 |
55218069 |
BLUESKY007 |
G |
June 6, 2019, 5:52 p.m. |
OK |
GNU C++11 |
TESTS |
50 |
1419 |
188825600 |
|
2700 |
55218302 |
Asuka_Minato |
G |
June 6, 2019, 6 p.m. |
OK |
GNU C++14 |
TESTS |
50 |
420 |
231628800 |
|
2700 |
45948433 |
tmwilliamlin168 |
G |
Nov. 19, 2018, 3:25 a.m. |
OK |
GNU C++14 |
TESTS |
50 |
420 |
231628800 |
|
2700 |
55218349 |
Asuka_Minato |
G |
June 6, 2019, 6:01 p.m. |
OK |
GNU C++14 |
TESTS |
50 |
421 |
231628800 |
|
2700 |
55218342 |
Asuka_Minato |
G |
June 6, 2019, 6:01 p.m. |
OK |
GNU C++14 |
TESTS |
50 |
421 |
231628800 |
|
2700 |
59668460 |
xiaowuc1 |
G |
Aug. 29, 2019, 3:03 p.m. |
OK |
GNU C++14 |
TESTS |
50 |
499 |
144076800 |
|
2700 |
45948589 |
tmwilliamlin168 |
G |
Nov. 19, 2018, 3:35 a.m. |
OK |
GNU C++14 |
TESTS |
50 |
545 |
231628800 |
|
2700 |
46274873 |
Batrr |
G |
Nov. 27, 2018, 10:53 a.m. |
OK |
GNU C++14 |
TESTS |
50 |
670 |
102297600 |
|
2700 |
45987929 |
YaKon4ick |
G |
Nov. 20, 2018, 7:57 a.m. |
OK |
GNU C++14 |
TESTS |
50 |
764 |
146841600 |
|
2700 |
45960021 |
lukomskiy |
G |
Nov. 19, 2018, 11:13 a.m. |
OK |
GNU C++14 |
TESTS |
50 |
920 |
145510400 |
|
2700 |
46275665 |
Sciorz |
G |
Nov. 27, 2018, 11:22 a.m. |
OK |
GNU C++14 |
TESTS |
50 |
1185 |
241766400 |
|
2700 |
64570986 |
hjk1030 |
G |
Nov. 9, 2019, 9:09 a.m. |
OK |
GNU C++17 |
TESTS |
50 |
374 |
96153600 |
|
2700 |
46014508 |
haleyk100198 |
G |
Nov. 21, 2018, 12:53 a.m. |
OK |
GNU C++17 |
TESTS |
50 |
436 |
181452800 |
|
2700 |
54967820 |
hjc20032003 |
G |
June 2, 2019, 7:14 a.m. |
OK |
GNU C++17 |
TESTS |
50 |
607 |
98611200 |
|
2700 |
62325078 |
Umi |
G |
Oct. 10, 2019, 6:07 p.m. |
OK |
GNU C++17 |
TESTS |
50 |
998 |
74854400 |
|
2700 |
60269796 |
Bohun |
G |
Sept. 8, 2019, 2:56 p.m. |
OK |
GNU C++17 |
TESTS |
50 |
1356 |
217395200 |
|
2700 |
46023840 |
wxh0l0910 |
G |
Nov. 21, 2018, 9:53 a.m. |
OK |
GNU C++17 |
TESTS |
50 |
1356 |
253952000 |
|
2700 |
46992978 |
Mirbek_aka |
G |
Dec. 14, 2018, 6:17 a.m. |
OK |
GNU C++17 |
TESTS |
50 |
1669 |
72908800 |
|
2700 |
48684317 |
redotter |
G |
Jan. 21, 2019, 2:35 p.m. |
OK |
GNU C++17 |
TESTS |
50 |
1934 |
144384000 |
|
2700 |
48684524 |
redotter |
G |
Jan. 21, 2019, 2:40 p.m. |
OK |
GNU C++17 |
TESTS |
50 |
1965 |
144384000 |
|
2700 |
46761219 |
JSZX11556 |
G |
Dec. 8, 2018, 1:33 p.m. |
OK |
GNU C++17 |
TESTS |
50 |
1996 |
194764800 |
|
2700 |
remove filters
Back to search problems