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

Обсуждение задачи 1212. Морской бой

Help! Why WA at 4?(+)
Послано SPIRiT 1 сен 2006 15:56
My idea of the problem was the following:
1) I know, how many K-ships can be placed on the FREE board.
It's a rather simple formula
2) After that I check each placed ship. For him I found all the K ships that cannot be placed on the board thanks to this ship and add them to the special array (if they aren't there already). After that I subtract the number of elements in the array out of FREE board amount and that's the answer.
Who can give me test 4?
Sorry, stupid mistake...
Послано SPIRiT 1 сен 2006 16:06
I didn't think about the case K=1. But now I fixed it and have WA 11. What's that test about?
Re: Sorry, stupid mistake...
Послано Partisan 15 июн 2009 16:58
Maybe you don't check when n<k or m<k (than common formula return incorrect value)
Re: Sorry, stupid mistake...
Послано Dmitriy 1 май 2012 20:47
excuse me, can give me test 4?