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 1238. Folding

Help me. please! WA#2!
Posted by AlexF [USTU] 22 Jan 2007 15:26
[code deleted]


Edited by author 22.01.2007 15:33

Edited by author 22.01.2007 15:41

Edited by author 22.01.2007 17:50
Re: Help me. please! WA#2!
Posted by KIRILL(ArcSTU) 22 Jan 2007 16:59
It's very strange
Your soulution absolutly correct
Test 2 from sample : NEERCYESYESYESNEERCYESYESYES
I think the reason with FreePascal compiler.


Re: Help me. please! WA#2!
Posted by AlexF [USTU] 22 Jan 2007 17:10
I really don't know how to avoid this problem in my solution!
Re: Help me. please! WA#2!
Posted by KIRILL(ArcSTU) 22 Jan 2007 17:24
Your solution have troubles on Timus when
result string ends with two ore more closing brackets
Re: Help me. please! WA#2!
Posted by AlexF [USTU] 22 Jan 2007 17:34
But why?? I can't understand this...
Re: Help me. please! WA#2!
Posted by AlexF [USTU] 22 Jan 2007 17:52
AC at last!)) I changed in my output procedure the line
        st := s1 + chr(40) + result1(l, l + ((r - l + 1) div w[l, r]) - 1) + chr(41);
to the lines
        st := s1;
        st := st + chr(40);
        st := st + result1(l, l + ((r - l + 1) div w[l, r]) - 1);
        st := st + chr(41);
And got AC!))
Re: Help me. please! WA#2!
Posted by KIRILL(ArcSTU) 22 Jan 2007 18:18
A new compiler for Pascal is needed on Timus
Re: Help me. please! WA#2!
Posted by AlexF [USTU] 22 Jan 2007 19:09
After me finding the bug for a hole day, I become think so!)