Kotlin Heroes: Episode 2

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
1211 Kotlin Heroes: Episode 2 FINISHED False 9000 169313063 Sept. 7, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 233 ) D Teams PROGRAMMING *special binary search greedy math 2200

B"There are n table bowling players, the rating of the i -th player equals r_i . Compose a maximum number of teams in a such way that: For example, if n=12 , r=[1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 6, 6] , a=1 , b=2 , k=2 , you can compose two teams with ratings [1, 2, 2] and one team with ratings [3, 6, 6] . So, the maximum number of teams is 3 . Find the maximum number of teams by given n, r_1 ... r_n, a, b and k to compose in respect to the given requirements. The first line of the input contains four integers n , a , b and k ( 1 <= n,a,b <= 3 cdot10^5 , 2 <= k <= 1000 ). The second line contains the sequence of player's ratings -- integers r_1, r_2, ... , r_n ( 1 <= r_i <= 10^6 ). Print only one integer -- the maximum number of teams that can be composed from n given players. "...

Tutorials

Kotlin Heroes: Episode 2 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
60227263 AJ47 D Sept. 7, 2019, 3:26 p.m. OK Kotlin TESTS 31 171 7987200 2200
60225883 MiFaFaOvO D Sept. 7, 2019, 3:05 p.m. OK Kotlin TESTS 31 171 7987200 2200
60231453 artsin666 D Sept. 7, 2019, 4:36 p.m. OK Kotlin TESTS 31 171 8192000 2200
60227288 wleung_bvg D Sept. 7, 2019, 3:27 p.m. OK Kotlin TESTS 31 202 0 2200
60226304 _lo D Sept. 7, 2019, 3:12 p.m. OK Kotlin TESTS 31 234 35840000 2200
60245328 nk2870 D Sept. 8, 2019, 2:05 a.m. OK Kotlin TESTS 31 249 8396800 2200
60226015 DmitryGrigorev D Sept. 7, 2019, 3:07 p.m. OK Kotlin TESTS 31 249 8396800 2200
60231554 Fortin D Sept. 7, 2019, 4:39 p.m. OK Kotlin TESTS 31 249 29491200 2200
60226846 alexey.enkov D Sept. 7, 2019, 3:20 p.m. OK Kotlin TESTS 31 265 34816000 2200
60227615 aleex D Sept. 7, 2019, 3:32 p.m. OK Kotlin TESTS 31 280 34816000 2200

remove filters

Back to search problems