|
|
back to boardanyone, please answer: i really confused with crash test1 Posted by lenny 16 Jan 2012 18:51 My solution use order-statistic tree (red-black tree with additional info in nodes). In my computer it passes test from problem description and my tests too (without crashes). Also I have function which solve this problem in a 'naive' way (O(n^2)). I've run this function and my solution on all possible n, k: 1 <= k <= n <= 300 and results was equal (there were no craches too). I know that n, k from test1 are less than 300. So, I don't know where is my bug or it is some kind of other error. code here: http://acm.timus.ru/forum/thread.aspx?id=27746&upd=634623275302370098 |
|
|