Show all threads Hide all threads Show all messages Hide all messages |
wa29 | 👑TIMOFEY👑`~ | 1872. Spacious Office | 18 Jul 2024 14:11 | 1 |
wa29 👑TIMOFEY👑`~ 18 Jul 2024 14:11 you print Ask Shiftman for help. once again, although the correct answer is Perfect |
Wrong answer 24 ( Знаю случай ) | Ilya | 1872. Spacious Office | 5 May 2021 04:52 | 1 |
Я получил такой вердикт, выводя "Ask Shiftman for help." как только встречалось в цикле подходящее условие, вместо того чтобы проверить все отрезки до конца на наличие случая "Let's search for another office." |
Read statement carefully | medegor44 | 1872. Spacious Office | 19 Oct 2019 16:58 | 1 |
Do not forget case for "Ask Shiftman for help" |
Why?! | Anny Kyort | 1872. Spacious Office | 5 Aug 2018 04:58 | 2 |
Why?! Anny Kyort 11 Oct 2014 19:48 |
WA 39 | Md sabbir Rahman | 1872. Spacious Office | 14 Jul 2018 00:50 | 1 |
WA 39 Md sabbir Rahman 14 Jul 2018 00:50 getting WA 39, can anyone please provide some test cases? |
WA#3 | Lakers | 1872. Spacious Office | 25 Feb 2018 17:00 | 3 |
WA#3 Lakers 19 Oct 2011 09:12 My program gets wa#3 test 3: 6 1 2 3 4 5 6 1 1 1 6 2 3 3 3 4 4 5 5 my program out: Perfect! 1 3 4 5 6 2 it's wrong? Edited by author 25.02.2018 18:18 |
Fast solution | Hallelujah | 1872. Spacious Office | 6 Sep 2013 11:55 | 4 |
For solving this problem I used advanced bipartite graph theory. But it work slowly(about 0.6sec). Very interesting how solve more quickly. Please, give me some hints.(My e-mail: scarlet.flower@list.ru) Maximum matchings in bipartite graph is almost enough to solve it + some "magic" :) Maybe maximum flow algos' works better here... My complexity was O(V*E), 0.3sec Also, O(NlogN) solution exists |
I got Accept, but I think I have used a wrong algorithm (See the sample in this topic) | 0909100811 | 1872. Spacious Office | 24 Feb 2013 20:26 | 2 |
5 1 2 3 4 5 1 3 1 3 4 5 4 5 4 5 I think the correct answer of this sample is "Let's search for another office.", but my program outputs "Ask Shiftman for help." I just couldn't squeeze my bipartite matching through the TL... Anyway, a nice test against extra greediness: 3 40 50 60 30 70 20 40 50 50 Perfect! 3 1 2 |
WA #39 | Artem | 1872. Spacious Office | 24 Mar 2012 14:16 | 1 |
WA #39 Artem 24 Mar 2012 14:16 WA #39 Did somebody have the same problem? Edited by author 24.03.2012 14:17 Edited by author 24.03.2012 14:17 |
TL #16 | marqueewinq | 1872. Spacious Office | 16 Nov 2011 20:41 | 1 |
TL #16 marqueewinq 16 Nov 2011 20:41 Hi there. I've got TL on 16-th with exceedence of 42 ms. Would anybody be so kind to help me manage with it? In my solution, i am building n lists: in i-th list, there are indexes of teams, that can occupy i-th office. After that, i'm running through all n lists, trying to find any OK variant. {{{ void run(int deep) { if (deep == n) { if (final.size() == 0) final = answer; else { cout << cAnswerIsNotUnique << "\n"; exit(0); } } else { for (int i = 0; i < ok[deep].size(); i++) { int target = ok[deep][i]; if (!cap[target]) { cap[target] = true; answer[target] = deep;
run(deep + 1); // cleanup answer[target] = -1; cap[target] = false; } } } } }}} How can i modify my algorithm for better runtime? I would be glad for any clue. Thx. Edited by author 16.11.2011 20:45 |