Kotlin Heroes: Episode 8

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
1571 Kotlin Heroes: Episode 8 FINISHED False 9900 103562663 Oct. 7, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 209 ) F Kotlinforces PROGRAMMING *special constructive algorithms dp

B'Kotlinforces is a web platfrom that hosts programming competitions. The staff of Kotlinforces is asked to schedule n programming competitions on the next m days. Each competition is held in multiple stages; the regulations of the i -th competition state that this competition should consist of exactly k_i stages, and each stage, starting from the second one, should be scheduled exactly t_i days after the previous stage. In other words, if the first stage of the i -th competition is scheduled on day x , the second stage should be scheduled on day x+t_i , the third stage -- on day x+2t_i , ..., the k_i -th stage (which is the last one) -- on day x+(k_i-1)t_i . All n competitions should be scheduled in such a way that they start and finish during the next m days, and on any of these m days, at most one stage of one competition is held (two stages of different competitions should not be scheduled on the same day). Is it possible to schedule all n competitions to meet these constraints? The first line contains two integers n and m ( 1 <= n, m <= 5000 ) -- the number of competitions and the number of days, respectively. Then n lines follow, each describing a competition which should be scheduled. The i -th line contains two integers k_i and t_i ( 2 <= k_i <= 5000 ; 1 <= t_i <= 2 ) -- the parameters of the i -th competition. If it is impossible to schedule all n competitions on the next m days so that there is at most one stage during each day, print -1. Otherwise, print n integers. The i -th integer should represent the day when the first stage of the i -th competition is scheduled; days are numbered from 1 to m . If there are multiple answers, print any of them. '...

Tutorials

Kotlin Heroes 8 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
131085933 Fortin F Oct. 7, 2021, 3:51 p.m. OK Kotlin 1.4 TESTS 88 124 21504000
131089665 armoking F Oct. 7, 2021, 4:56 p.m. OK Kotlin 1.4 TESTS 88 140 20992000
131091431 30something F Oct. 7, 2021, 5:18 p.m. OK Kotlin 1.4 TESTS 88 140 21606400
131088200 Spheniscine F Oct. 7, 2021, 4:14 p.m. OK Kotlin 1.4 TESTS 88 140 23552000
131089172 nguyen31hoang08minh2003 F Oct. 7, 2021, 4:38 p.m. OK Kotlin 1.4 TESTS 88 155 21196800
131082670 xiaowuc1 F Oct. 7, 2021, 3:22 p.m. OK Kotlin 1.4 TESTS 88 155 21811200
131086423 Nikitosh F Oct. 7, 2021, 3:56 p.m. OK Kotlin 1.4 TESTS 88 155 22323200
131081897 SpyCheese F Oct. 7, 2021, 3:16 p.m. OK Kotlin 1.4 TESTS 88 155 23244800
131086043 eatmore F Oct. 7, 2021, 3:52 p.m. OK Kotlin 1.4 TESTS 88 156 21094400
131089990 shivensinha4 F Oct. 7, 2021, 5 p.m. OK Kotlin 1.4 TESTS 88 171 22323200
131088911 bobib F Oct. 7, 2021, 4:31 p.m. OK Kotlin 1.5 TESTS 88 187 25497600
131088551 Musin F Oct. 7, 2021, 4:23 p.m. OK Kotlin 1.5 TESTS 88 217 25497600
131085836 freak93 F Oct. 7, 2021, 3:50 p.m. OK Kotlin 1.5 TESTS 88 218 26316800
131090568 kachhuaa F Oct. 7, 2021, 5:07 p.m. OK Kotlin 1.5 TESTS 88 233 26316800
131089217 tob123 F Oct. 7, 2021, 4:39 p.m. OK Kotlin 1.5 TESTS 88 233 27648000
131088812 itohdak F Oct. 7, 2021, 4:29 p.m. OK Kotlin 1.5 TESTS 88 233 27750400
131091094 Ji_Kuai F Oct. 7, 2021, 5:13 p.m. OK Kotlin 1.5 TESTS 88 233 27955200
131084423 Egor F Oct. 7, 2021, 3:37 p.m. OK Kotlin 1.5 TESTS 88 233 66560000
131085370 arvindf232 F Oct. 7, 2021, 3:46 p.m. OK Kotlin 1.5 TESTS 88 248 33382400
131088334 Kude F Oct. 7, 2021, 4:17 p.m. OK Kotlin 1.5 TESTS 88 249 26316800

remove filters

Back to search problems