A new definition of bad implementation

Revision en2, by dvdg6566, 2020-11-08 12:27:48

WARNING: DISGUSTING PROBLEM ALERT

At the start of the year, I wrote a very painful implementation problem. My official solution was over 200 lines long and I was wondering if anyone could come up with a more elegant solution.

The problem is as follows:

Problem

Given some subtasks, the highest score was 72 by A_Wallaby. Majority of participants scored 27 points, where $$$B_i = 0$$$ for all $$$i$$$.

Solution

This problem is by no measure an elegant problem. It took me close to 4h to implement. I was wondering if anyone could find a more elegant solution? If anyone is interested, here is the problem statement and the solution code.

Tags #data structure, #advance data structures, cancer

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English dvdg6566 2020-11-08 12:30:17 0 (published)
en4 English dvdg6566 2020-11-08 12:29:51 13 Tiny change: 'ates, are \textbf{unique}. \n\nOutp' -> 'ates, are **unique**. \n\nOutp'
en3 English dvdg6566 2020-11-08 12:28:47 30 Tiny change: ':A_Wallaby,2020-11-08]. Majorit' -> ':A_Wallaby]. Majorit'
en2 English dvdg6566 2020-11-08 12:27:48 1145
en1 English dvdg6566 2020-11-08 12:19:30 696 Initial revision (saved to drafts)