Hit the wall
Need to find as much information about pattern recognition as possible.
Does anybody know good books or sites? “Bayesian theory” and “fuzzy logic” sound good, but question is how to apply theory in practice?
Need to find as much information about pattern recognition as possible.
Does anybody know good books or sites? “Bayesian theory” and “fuzzy logic” sound good, but question is how to apply theory in practice?
You have found an ancient carpet in your attic. It was originally black, but during it’s long life it obtained some white stains. Since it is so old we can’t remember maybe it was a white carpet, and the stains are black! You can not tell if it was white or black! Luckily you have found a bottle of Universal Spot Remover. A single drop of this magic liquid can change the color of any white spot to black, no matter how big the spot is. Amazingly, the same drop, if applied to a black spot, would change the color to white! You would like to remove all spots from the carpet. Since you do not know if it was initially black or white, you would be happy to have a carpet that is either completely black OR completely white. Just don’t waste the remover!
Your Task:
Write a program that finds the minimum number of drops needed to remove all stains from the carpet. Assume that the carpet is a MxN rectangle divided into M*N regular checks, some of which are black, some white. The stain is a group of checks of the same color connected side-by-side. For example, if the carpet were 8×8 (with alternating colors, like a chessboard), there would be exactly 32 white and 32 black stains. Note that when you remove a stain, it will merge with other neighboring stains.
Via RSDN
Upd: Answer can easily be found using Graph theory (look for something about finding the longest route in a graph or similar). Or, I just used a hint (chessboard) from the task, considering which it is easy to see that 3 drops would be enough for a carpet of 8×8 stains. The rest is trivial.
Вот уже пятый день, как ломаю WordPress.
Накойхрен мне это надо? Все просто – хочу вести двуязычный блог в одном, гхм, месте. WordPress казался, да и кажется, лучшей пока платформой для этого, вот только объем взмахов топором, необходимых для того, чтобы оно наконец нормально заработало, уже зашкаливает:
В общем, провел достаточно времени, занимаясь PHP хакингом.
Пойду, отдохну немного на C++.
I don’t like FLASH animation much, but this is awesome.
Оказывается, не поддерживает треды в комментах по умолчанию.
Нашел вчера плагин, который поддерживает, но он удаляет OpenID логин элементы с формы.
Нет в жизни Щастья. Пошел искать рашпиль побольше.
поставить плагин: http://meidell.dk/archives/2006/12/19/brians-threaded-comments-159/
(2 Колобок – я не тырил твою идею, честно!)
Вот, поднял свой блог на своем домене.
Заходите в гости, плиз.
Логиниться, кстати, можно через openID.
Hi all,
Just trying to setup bilingual blog.
Installed Wordpress 2.3.1 and gengo plugin (had to apply hammer to it – did not want to work under Wordpress 2.3.1).
Let’s see how it works…