codolove's blog

By codolove, 10 years ago, In English

I was trying to apply the divide and conquer algorithm for closest pair of points on this problem. I have been getting wrong answer many times. My solution is here. I read this algorith from this site.

  • Vote: I like it
  • +6
  • Vote: I do not like it

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

In 23-rd line you multiply ints up to 106. It will cause overflow. And be careful about number of digits in output.

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

    I corrected the overflow situation but again I am getting segmentation fault. Could you please check it again? My new solution is here