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 1102. Strange Dialog

This is unbelievable !!!
Posted by sdfsdf 25 Jun 2005 00:04
Still TLE!
I'm reading from file not in a character, but in string.
I'm parsing the string from the end, so my program reads each character 1 time (using DFA).
Is there ANY other way to improve perfomance? I guess not.
Please, if someone solved this problem using C++, tell me HOW you did it.
I got AC!
Posted by sdfsdf 25 Jun 2005 14:44
There is no problem with speed (0.109).
The lines are just too long, and program simply can't read them into strings. The only way to solve this problem is to carefully parse text from beginning reading each character.