Consider a $ n\times n $ square grid which is divided into $ n^2 $ unit squares(think of a chess-board). The set of all unit squares intersecting the main diagonal of the square or lying under it is called an $n$-staircase. Find the number of ways in which an $n$-stair case can be partitioned into several rectangles, with sides along the grid lines, having mutually distinct areas.
1. **Labeling the Grid:**
   Label the squares so that the lower-left square is \((1,1)\) and the upper-right square is \((n,n)\). The main diagonal is the diagonal from \((1,1)\) to \((n,n)\). A square \((x,y)\) belongs to the \(n\)-staircase if and only if \(1 \le x \le y \le n\).

2. **Rectangle Containment:**
   Note that every rectangle can contain at most one square in the main diagonal.
   - **Proof:**
     Suppose a rectangle contains two (or more) squares in the main diagonal; let two of the squares in the main diagonal be \((a,a)\) and \((b,b)\), where \(a < b\). So the rectangle has the squares \((a,b)\) and \((b,a)\). However, \((b,a)\) is not in the \(n\)-staircase as the first paragraph stated. So a rectangle can only contain at most one square in the main diagonal.

3. **Number of Rectangles:**
   Since there are \(n\) squares in the main diagonal, there are at least \(n\) rectangles. Since the area of the rectangles are all distinct, the minimum total area of the rectangles is:
   \[
   1 + 2 + 3 + \cdots + n = \frac{n(n+1)}{2}
   \]
   However, the area of the \(n\)-staircase is also \(\frac{n(n+1)}{2}\), so there are exactly \(n\) rectangles, the areas of them are \(1, 2, 3, \cdots, n\), and all rectangles contain exactly one square in the main diagonal.

4. **Rectangle Dimensions:**
   We will prove that each rectangle must have the dimensions \(1 \times k\) for some \(k\) (depending on its area).
   - The largest area of the rectangles is \(n\).
   - Note the square \((1,n)\). It can only be covered by a rectangle of area \(n\), since all other rectangles are not large enough to be able to cover both the square \((1,n)\) and one of the squares of the main diagonal. With area \(n\), that rectangle can only cover \((1,n)\) and either \((1,1)\) or \((n,n)\), since other squares will give a rectangle with area larger than \(n\). Both choices of \((1,1)\) and \((n,n)\) give the rectangle dimensions \(1 \times n\), and the remaining region is an \((n-1)\)-staircase with the largest area of the rectangles remaining is \(n-1\), which can use the proof above. So all rectangles have dimensions \(1 \times k\) for some \(k\).

5. **Inductive Proof for Placements:**
   We will prove by induction that the number of ways to partition the \(n\)-staircase is \(2^{n-1}\).
   - **Base Case:**
     For \(n=1\), it's obvious.
   - **Inductive Step:**
     Suppose the claim is true for \(n=k\). For \(n=k+1\), note that the rectangle with the area \(k+1\) can only be placed in two possible ways, and the remaining region is a \(k\)-staircase that can be partitioned in \(2^{k-1}\) ways. So the number of ways a \((k+1)\)-staircase can be partitioned is:
     \[
     2 \cdot 2^{k-1} = 2^k
     \]
     This is consistent with the claim. So the claim is proven.

So the number of ways to partition an \(n\)-staircase is \(\boxed{2^{n-1}}\).