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 1494. Monobilliards

WA 23 .... wth is this. -_-
Posted by Mewtwo 3 Apr 2016 23:34
I used a simple algo... I am just checking 3 consecutive numbers... If any 3 consecutive numbers from the given numbers are like this, n1>n3>n2 (mid one is the smallest, first one is the largest and the last one lies in between these two values) , then the sequence is invalid (Cheater) ... else , I print "Not a proof" ...

Is my algo ok? If so, then please help me with some test cases...
I have tried all the test cases found in the discussions and my program passed all of them...
Re: WA 23 .... wth is this. -_-
Posted by Jane Soboleva (SumNU) 3 Apr 2016 23:55
I used to have WA23, but then i looked through discussions and saw this
http://acm.timus.ru/forum/thread.aspx?id=22907&upd=634542935571668865
Process modelling is really the best thing here imo, so i advise to go with it.
Re: WA 23 .... wth is this. -_-
Posted by Mewtwo 4 Apr 2016 00:43
Jane Soboleva (SumNU) wrote 3 April 2016 23:55
I used to have WA23, but then i looked through discussions and saw this
http://acm.timus.ru/forum/thread.aspx?id=22907&upd=634542935571668865
Process modelling is really the best thing here imo, so i advise to go with it.

Thanks a lot for your answer. I haven't heard about "Process Modelling" ... I'll look into it asap.
And my algo that I used is wrong actually. It fails in this type of cases...
4
3 1 4 2
Correct answer is "Cheater", but my program shows "Not a proof"...
I wonder how it passed 22 tests... 0_O


Thanks again... :)
Re: WA 23 .... wth is this. -_-
Posted by Jane Soboleva (SumNU) 4 Apr 2016 00:50
«I haven't heard about "Process Modelling" ... I'll look into it asap.»
Well, it's simple. Basically you just put balls into array in a proper order, and when the last ball is a current takeout request, you take it out of the array and move to next takeout request, and repeat if needed. If at certain point the takeout ball is not the one you expect, the answer is cheater. Good luck~
Re: WA 23 .... wth is this. -_-
Posted by Ealham 24 Feb 2019 01:32
Thanks a lot...
Got AC.