ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1494. Монобильярд

WA 23 .... wth is this. -_-
Послано Mewtwo 3 апр 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. -_-
Послано Jane Soboleva (SumNU) 3 апр 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. -_-
Послано Mewtwo 4 апр 2016 00:43
Jane Soboleva (SumNU) писал(a) 3 апреля 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. -_-
Послано Jane Soboleva (SumNU) 4 апр 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. -_-
Послано Ealham 24 фев 2019 01:32
Thanks a lot...
Got AC.