My recursion is wrong somehow? (Round 387 div2E)

Revision en2, by memeset, 2016-12-19 08:54:20

Hi all,

Could someone please look at my code to this problem? Its a simple dfs with an extra iterating variable, but I'm confused as to why it's returning wrong answer. I'm 90% sure that the string processing part of my code is correct, so that leaves the dfs() function that probably has a bug in it.

vector< string > height[] is the array that I use to store the strings that are on a certain level, and I use vector< int > comma to store the position of the commas to make it easier to extract the numbers and the strings. Also, mx is the maximum height of a comment.

Thanks for your time everyone!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English memeset 2016-12-19 08:54:20 10
en1 English memeset 2016-12-19 08:53:56 756 Initial revision (published)