Kotlin Heroes: Episode 1

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
1170 Kotlin Heroes: Episode 1 FINISHED False 9000 178385087 May 28, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1098 ) B Bad Days PROGRAMMING *special implementation

B'Every day Kotlin heroes analyze the statistics of their website. For n days, they wrote out n numbers a_1, a_2, ... , a_n , where a_i is the number of visits on the i -th day. They believe that a day is bad if there are at least 2 days before it with a strictly greater number of visits. For example, if n=8 and a=[3, 1, 4, 1, 5, 9, 2, 6] , then the day 4 is bad (because a_4=1 , but there are a_1=3 and a_3=4 ). Also, the day with the number 7 is bad too. Write a program that finds the number of bad days. The first line contains an integer n ( 1 <= n <= 2 cdot10^5 ), where n is the number of days. The second line contains n positive integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ), where a_i is the number of website visits on the i -th day. Print the number of bad days, i.e. such days that there are at least two days before it with a strictly greater number of visits. '...

Tutorials

Kotlin Heroes Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
54756818 drd93 B May 28, 2019, 2:57 p.m. OK Kotlin TESTS 14 109 0
54803312 sarthakmanna B May 29, 2019, 12:54 p.m. OK Kotlin TESTS 14 124 0
55610797 ReaLNero1 B June 16, 2019, 5:35 a.m. OK Kotlin TESTS 14 140 0
54757482 deka0106 B May 28, 2019, 3:06 p.m. OK Kotlin TESTS 14 140 0
54759591 leksoo B May 28, 2019, 3:32 p.m. OK Kotlin TESTS 14 140 3993600
54756443 brainail B May 28, 2019, 2:53 p.m. OK Kotlin TESTS 14 140 3993600
54769678 lunaticcreature B May 28, 2019, 5:56 p.m. OK Kotlin TESTS 14 140 4096000
55008452 Jamb0t B June 3, 2019, 8:52 a.m. OK Kotlin TESTS 14 155 3993600
54757101 merfemor B May 28, 2019, 3:01 p.m. OK Kotlin TESTS 14 155 3993600
54756324 timurtibeyev B May 28, 2019, 2:52 p.m. OK Kotlin TESTS 14 155 3993600

remove filters

Back to search problems