Codeforces Round 387 : Comments(E)

Правка en1, от 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.

Теги #dfs, expression parsing, round 387

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский netflix 2016-12-19 12:54:27 491 Initial revision (published)