Project Euler #124: Ordered radicals

  • + 0 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.