Monir's blog

By Monir, history, 3 years ago, In English

Somebody help me in this problem. I am stuck at Convex hull trick. Here is my Convex Hull trick implementation for the problem. But every time I am getting overflow. How to overcome from this. Also you can provide me a good fft template. Submission :131502964 Problem link : 319C - Kalila and Dimna in the Logging Industry

  • Vote: I like it
  • -21
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it +34 Vote: I do not like it

Is this FFT? I think this is convex hull trick.

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Sorry.My bad . I was out of my mind. this is CHT. Finally i used __float128 and accepted. Is there any way to use long long?

    Thanks @TheScrasse

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      __int128 should work in GNU C++17 (64).

      • »
        »
        »
        »
        3 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Getting compilation error in __int128

        • »
          »
          »
          »
          »
          3 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          You are using GNU C++17 (32), try to switch to 64 bit.