ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1027. D++ Again

used algos
Posted by strider 18 Jan 2009 12:57
I've read in one of the posts below that the problem is to be solved by recursive deleting of comments/arithmetics (at least i've got so).
I suppose the problem is solvable with char-by-char reading. It's necessary to remember only one previous character and to update some conditions like "we are in comment", "we are in arithmetic expression", ... at the proper time. I've got AC with such an algo.