Submission link: https://codeforces.com/contest/1374/submission/108983493
can you please help why i’m getting Runtime error on this submission
I sorted the books in ascending order according to time, you can see that in the comparator function…
LOGIC:
after sorting I start picking books from first index, if a book is liked by both then it is included, if a book is liked by only then it is only included if its count is less than k and also inserted in a stack… which might be removed later on depending upon rest of the books