|
|
вернуться в форумO(M * log N) in 0.421s with C# and without Binary Search!! Using Binary Indexed Tree (aka Fenwick tree) and standart System.Dictionary (dictionary bsaed on hashing). Hint: you do not need binary search over heap! If you're familiar with Fenwick tree's structure, you can write your own function, which'll find the smallest index in fenwick's tree with given sum. |
|
|