|
|
вернуться в форумNice problem, some hints Послано raggzy 11 мар 2014 03:12 For those who couldn't do straightforward O(n^2) with tricks. Think of < as 0 and > as 1. Every time you see >< (10) you replace (swap) it with <> (01). Which means, you stop as soon as you get sorted stuff, 0*1*. Doesn't it look like count of swaps in bubblesort? :) Re: Nice problem, some hints this solution wont pass TL on 15 with small tricks on wont pass 16 |
|
|