(int[] points, int m)
| 50 | x = (midVal + points[I] - 1 )/ points[I] |
| 51 | */ |
| 52 | //code |
| 53 | class Solution { |
| 54 | public long maxScore(int[] points, int m) { |
| 55 | int n = points.length; |
| 56 | if (m < n) return 0; |
| 57 | |
| 58 | long left = 1, right = (long) 1e18, maxPossibleMinScore = 0; |
| 59 | |
| 60 | while (left <= right) { |
| 61 | long targetScore = left + (right - left) / 2; |
| 62 | if (canAchieve(points, n, m, targetScore)) { |
| 63 | maxPossibleMinScore = targetScore; |
| 64 | left = targetScore + 1; |
| 65 | } else { |
| 66 | right = targetScore - 1; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | return maxPossibleMinScore; |
| 71 | } |
| 72 |
nothing calls this directly
no test coverage detected