public boolean searchMatrix(int[][] matrix, int target) {
		// IMPORTANT: Please reset any member data you declared, as
		// the same Solution instance will be reused for each test case.
		if (matrix == null || matrix.length == 0)
			return false;
		int m = matrix.length;
		int n = matrix[0].length;
		int s = 0;
		int e = m * n - 1;
		while (s <= e) {
			int mid = (s + e) >> 1;
			int x = mid / n;
			int y = mid % n;
			if (matrix[x][y] == target) {
				return true;
			} else if (matrix[x][y] > target) {
				e = mid - 1;
			} else {
				s = mid + 1;
			}
		}
		return false;
	}