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 1992. CVS

Hint that helped me to get AC
Posted by Chitanda Eru 27 Oct 2013 10:46
1. *deleted*
2. It's possible for the input file size to exceed 6 MB. In C++, reading it from cin is out of the question, and scanf() is apparently slow too. getchar() is faster.

Edited by author 27.10.2013 14:02
Re: Hints that helped me to get AC
Posted by Erop [USU] 27 Oct 2013 11:57
Your test is incorrect, "If a clone learn (not relearn) a program, all cancellation record history of this clone is deleted". So we can't do "relearn" in last line.

First test is test from statment, and it is correct
Your first solution has a bug, so it falls with runtime
Re: Hints that helped me to get AC
Posted by Chitanda Eru 27 Oct 2013 14:35
Oh, found it. Using a buffer of 8 chars to read the command's name was a terrible idea (one more is needed for '\0'), but it worked fine on my local machine. Is there a way to track such access violations locally?
Deleted the first "hint" to avoid causing confusion.