Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

Codeforces Round 387 : Comments(E)

Revision en1, by netflix, 2016-12-19 12:54:27

In this question I am applying DFS to solve it. I go down to the lowest level of any word. Then again I apply DFS from the next word. But I am being given TLE on test case 29 continuously. In test case 29, there is only one string with no children : string,0 (something like this). Can someone help me with my code or is my complexity itself too high for my solution to be correct. Here is my solution link : http://ideone.com/hiaumA . Thank-you in advance.

Tags #dfs, expression parsing, round 387

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English netflix 2016-12-19 12:54:27 491 Initial revision (published)