|
|
Show all threads Hide all threads Show all messages Hide all messages | к жюри | xMagGTU Дмитрий Тишкин GPRS | 1533. Fat Hobbits | 26 Mar 2014 01:54 | 9 | к жюри xMagGTU Дмитрий Тишкин GPRS 3 Mar 2007 14:00 перепроверте тесты задачи B pls чё за xMagGTU Дмитрий Тишкин GPRS 5 Mar 2007 00:00 исходя из условий задачи необходимо вывести номера хобитов(строк) состоящих из одних нулей предворив список на отдельной строке числом таких строк засада при случае когда таких строк нет( возможен когда матрица содержит ошибочные данные тк как всегда должен имется легчайший хобит) ВОПРОС почему так мало ac? у такой на первый взгляд простой задачи? намекните pls! not so easy, try this test: 3 0 0 0 1 0 0 1 0 0 answer: 2 2 3 or this: 3 0 0 0 0 0 0 1 1 0 answer: 2 1 2 По-моему так это NP-полная задача на 100 узлов Edited by author 16.09.2010 19:25 Эта задача решается за O(n^2) + Кун. Так что совсем быстро :) | How to solve correctly? | Victor Barinov (TNU) | 1533. Fat Hobbits | 24 Aug 2008 17:34 | 4 | Hi! I know that exists theorem: Minimal number of paths that cover such graph equals to maximal number of independent vertices. If I found this paths how can i recieve necessary vertices? Thanks! I think that it is some clever ways to solve NP problems. It works only in authors limits. O(n^3)exists! Apply bipartie maximal cardinality matching. Standard matchig programm must be strengthening by finding minimal vertex covering. All vertex out of minimal covering - hobbits! Edited by author 02.11.2007 09:02 This problem can be solved in O(N^3) time. Victor. To solve what you want, you should find maximum clique in inversed transitive closure graph. Anyway, such level of abstraction leads to NP solution, try some other way. Transitive closure graph has some extra properties which allow O(N^3). | How to solve this problem ?? | ProgBeat | 1533. Fat Hobbits | 18 Jun 2007 01:37 | 1 | I got AC with very optimized backtraking, I think the problem has simple solution.. Could you tell me your algo or send me your code in case if you solved it without backtraking ? e-mail: www-www-www@mail.ru | i got ac, but don't understand how! please, send me your sol! | EfremovAleksei | 1533. Fat Hobbits | 22 Apr 2007 17:28 | 2 | efrcom [at] inbox [dot] ru Edited by author 04.05.2007 01:03 | WA#47? Special case? | EfremovAleksei | 1533. Fat Hobbits | 27 Mar 2007 14:48 | 1 | closed! AC! Edited by author 27.03.2007 14:51 |
|
|
|