Let $n$ be a positive integer. In an $n\times n$ garden, a fountain is to be built with $1\times 1$ platforms covering the entire garden. Ana places all the platforms at a different height. Afterwards, Beto places water sources in some of the platforms. The water in each platform can flow to other platforms sharing a side only if they have a lower height. Beto wins if he fills all platforms with water. 
Find the least number of water sources that Beto needs to win no matter how Ana places the platforms.
1. **Claim and Initial Setup**:
   We claim that the least number of water sources Beto needs is \( \lceil \frac{n^2}{2} \rceil \). To justify this, we consider a chessboard coloring of the \( n \times n \) garden, where there are \( \lceil \frac{n^2}{2} \rceil \) black squares and \( \lfloor \frac{n^2}{2} \rfloor \) white squares.

2. **Height Assignment**:
   Assign distinct positive real numbers to the black squares in the interval \( (1, 2) \) and distinct positive real numbers to the white squares in the interval \( (0, 1) \). This ensures that no water can flow from a white square to a black square because the height of any black square is always greater than the height of any white square.

3. **Minimum Water Sources**:
   Since water cannot flow from a white square to a black square, each black square must have its own water source. Therefore, at least \( \lceil \frac{n^2}{2} \rceil \) water sources are needed in this configuration.

4. **Sufficiency of \( \lceil \frac{n^2}{2} \rceil \) Water Sources**:
   To show that \( \lceil \frac{n^2}{2} \rceil \) water sources are sufficient for any configuration, partition the \( n \times n \) garden into \( \lceil \frac{n^2}{2} \rceil \) regions of size \( 2 \times 1 \) (with possibly one \( 1 \times 1 \) region if \( n \) is odd). In each of these regions, place a water source at the platform with the maximum height.

5. **Water Flow**:
   In each \( 2 \times 1 \) region, the water will flow from the platform with the maximum height to the platform with the minimum height. This ensures that all platforms in the garden will be filled with water.

6. **Conclusion**:
   Therefore, the least number of water sources Beto needs to ensure that all platforms are filled with water, regardless of how Ana places the platforms, is \( \lceil \frac{n^2}{2} \rceil \).

The final answer is \( \boxed{ \lceil \frac{n^2}{2} \rceil } \)