added overflow check in the double -> long long conversion trick to avoid...
added overflow check in the double -> long long conversion trick to avoid integer overflows. I think this was not needed in practical terms, but it is safer
Please register or sign in to comment