We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Very hard problem. In order to pass all test cases you have to build a segment tree, but only for those L less than 200000. L larger than 1000000 requires a different approach. For segment tree the complexity is O(T * logL^2) where L is the largest L <= 200000.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #124: Ordered radicals
You are viewing a single comment's thread. Return to all comments →
Very hard problem. In order to pass all test cases you have to build a segment tree, but only for those L less than 200000. L larger than 1000000 requires a different approach. For segment tree the complexity is O(T * logL^2) where L is the largest L <= 200000.