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

Обсуждение задачи 1166. Funny Card Game

HINT to all who want to solve this problem. SUPPOSED TO BE USEFUL!!!
Послано 198808xc 18 авг 2008 11:01
The description to this problem is so long and so ambiguous, that very few people can understand it.
I myself understood it with 2 hours and made a BIG mistake.
Now, I will explain it to you all.

We don't have to pay much attention to the exact rules, but only the card we can lay.
According to the description, we can only lay skip-turn cards until the last one(of course, the last card can be any one), and make sure that all the continuous cards is connectable. What we must do is to find a card sequence to match this.
BUT, there is some TRAPS here:
1. If the last-laid card is QUEEN, then is must be followed by a same-suit card, it means that, for example, we can't use a QC to cover a QD.
2. Jokers may be the most useful cards, but it is the hardest part to this problem(at least I think so). To use it, you can of course assign its value and suit arbitrary, but please make sure that it can match its previous and next card. For instance, you can't use joker here: 3C * JH,
for * can't be a skip-turn card here.

That's all. My solution is not very good, it got ACCEPTED in 0.156 sec.
May all of you a better result than me.

Edited by author 18.08.2008 11:03
Re: HINT to all who want to solve this problem. SUPPOSED TO BE USEFUL!!!
Послано данные 8 фев 2009 17:18
I think we can use joker here: 3C * JH,
when wei set * as 8QCH.
(We can do this,see the sample input)

Edited by author 08.02.2009 17:18

Edited by author 08.02.2009 17:18
Re: HINT to all who want to solve this problem. SUPPOSED TO BE USEFUL!!!
Послано данные 10 фев 2009 12:50
Now I know I am wrong!
You can only use 6,7,A and KS.(Except the last card).
Thanks to 198808xc !
Now I got AC!!

Edited by author 10.02.2009 12:50

Edited by author 10.02.2009 18:24
Re: HINT to all who want to solve this problem. SUPPOSED TO BE USEFUL!!!
Послано svr 14 июн 2009 09:47
But skipping card may be any one,  9H , for example,
if second player hasn't connectable card for it
and upper card in desk also isn't connectable.

Edited by author 14.06.2009 09:50
Re: HINT to all who want to solve this problem. SUPPOSED TO BE USEFUL!!!
Послано xurshid_n 16 фев 2012 18:37
svr писал(a) 14 июня 2009 09:47
But skipping card may be any one,  9H , for example,
if second player hasn't connectable card for it
and upper card in desk also isn't connectable.

Edited by author 14.06.2009 09:50

But, second player may has Joker. Hovewer, 9H - never skipping card. Am I right?


AC~!!! 0.031 in tje first attempt

Edited by author 16.02.2012 21:31