Let $n$ be a fixed positive integer. Oriol has $n$ cards, each of them with a $0$ written on one side and $1$ on the other. We place these cards in line, some face up and some face down (possibly all on the same side). We begin the following process consisting of $n$ steps:

1) At the first step, Oriol flips the first card
2) At the second step, Oriol flips the first card and second card
.
.
.
n) At  the last step Oriol flips all the cards

Let $s_0, s_1, s_2, \dots, s_n$ be the sum of the numbers seen in the cards at the beggining, after the first step, after the second step, $\dots$ after the last step, respectively.

          a) Find the greatest integer $k$ such that, no matter the initial card configuration, there exists at least $k$ distinct numbers between $s_0, s_1, \dots, s_n$.
          b) Find all positive integers $m$ such that, for each initial card configuration, there exists an index $r$ such that $s_r = m$.

[i]Proposed by Dorlir Ahmeti[/i]
### Part (a)

1. **Initial Observation**:
   - Let \( s_0 \) be the initial sum of the numbers seen on the cards.
   - At each step \( i \), Oriol flips the first \( i \) cards.
   - Therefore, \( s_i \) is the sum of the numbers seen on the cards after the \( i \)-th step.

2. **Flipping Mechanism**:
   - Flipping a card changes its value from 0 to 1 or from 1 to 0.
   - Thus, flipping a card changes the sum \( s_i \) by \(\pm 1\).

3. **Sum Changes**:
   - At the first step, only the first card is flipped, so \( s_1 = s_0 \pm 1 \).
   - At the second step, the first two cards are flipped, so \( s_2 = s_1 \pm 1 \).
   - This pattern continues, so \( s_i = s_{i-1} \pm 1 \).

4. **Distinct Values**:
   - Since each step changes the sum by \(\pm 1\), the sequence \( s_0, s_1, \ldots, s_n \) can only take on values within the range \([s_0 - n, s_0 + n]\).
   - However, the exact number of distinct values depends on the initial configuration and the sequence of flips.

5. **Greatest Integer \( k \)**:
   - To find the greatest integer \( k \) such that there are at least \( k \) distinct values, we need to consider the worst-case scenario.
   - In the worst case, the sum oscillates between two values, e.g., \( s_0 \) and \( s_0 \pm 1 \).
   - Therefore, the greatest integer \( k \) such that there are at least \( k \) distinct values is \( k = 2 \).

### Part (b)

1. **Possible Values of \( s_r \)**:
   - We need to find all positive integers \( m \) such that for each initial card configuration, there exists an index \( r \) such that \( s_r = m \).

2. **Initial Configuration**:
   - Consider the initial configuration where all cards are face up (all 1s) or all face down (all 0s).
   - If all cards are face up, the initial sum \( s_0 = n \).
   - If all cards are face down, the initial sum \( s_0 = 0 \).

3. **Sum Changes**:
   - As we flip the cards, the sum changes by \(\pm 1\) at each step.
   - Therefore, the possible sums \( s_r \) will range from 0 to \( n \).

4. **Middle Values**:
   - The middle values of this range are \(\lfloor \frac{n}{2} \rfloor\) and \(\lceil \frac{n}{2} \rceil\).
   - These values are always achievable because the sum changes by \(\pm 1\) at each step, covering all integers in the range from 0 to \( n \).

5. **Conclusion**:
   - The positive integers \( m \) such that for each initial card configuration, there exists an index \( r \) such that \( s_r = m \) are \(\lfloor \frac{n}{2} \rfloor\) and \(\lceil \frac{n}{2} \rceil\).

The final answer is \( \boxed{2} \) for part (a) and \( \boxed{\lfloor \frac{n}{2} \rfloor \text{ and } \lceil \frac{n}{2} \rceil} \) for part (b).