In case anyone is struggling with WA using a Binary Search The Answer approach with Java BigInteger... The following statement may not currently apply to all the test input:
It is guaranteed, that for given Y , X will be always an integer.
I got AC by returning X - 1 in case binary search gave ...
Search found 3 matches
- Tue May 31, 2016 1:05 am
- Forum: Volume 100 (10000-10099)
- Topic: 10023 - Square root
- Replies: 121
- Views: 45618
- Wed Apr 06, 2016 4:49 am
- Forum: Volume 116 (11600-11699)
- Topic: 11692 - Rain Fall
- Replies: 3
- Views: 3422
Re: 11692 - Rain Fall
I am wondering if anyone can provide a hint about how to set up the problem as a quadratic equation.
- Mon Mar 14, 2016 6:15 pm
- Forum: Volume 11 (1100-1199)
- Topic: 1185 - Big Number
- Replies: 6
- Views: 3795
Re: 1185 - Big Number
Is there an algorithm faster than O(n) for this problem? I have AC with precalc using c++11, but it is >0.5s while the fastest ones are ~0.010.