|
|
вернуться в форумStrange Things I solved this problem when I was awful newbie. Some days ago I tried to help my friend with it. I realized that my AC code is terrible and absolutely wrong))) But it's still AC. It made us burst out laughing))))) There are no clarifications about intersection of comments and arithmetical expressions in this problem. Here are some test my AC code produce: (() YES (1)(* YES (-)+ YES If rejudge occur I'd like to see neat statement to rewrite it correctly) Re: Strange Things 1) Answer is NO. Brackets have to be balanced. 2) Answer is NO. Comment is not closed. 3) Answer is YES. All correct. These tests and some more were added. About 140 solutions lost AC, but tests are still weak in this problem. Maybe new tests will be added. Re: Strange Things Послано svr 11 ноя 2008 20:56 I think that Ac prog must be terrible and absolutely wrong because with n=10000 this problem impossible to solve. We must consider all possible unitersecting sets of segments of commentries and after apply to residues arithmetics expression rules. This collection of sets of commentry segments very big. Standard right way- recursion: We extract one possible commentry segment and apply same algo to residue. AC says me that authors used additional unsaid condition: each commentry '(*' ends on the FIRST closing '*)'. Without this I considered "(*)*)*)" As YES But now it NO. With additional condition the problem became very simple. Edited by author 12.11.2008 10:59 |
|
|