A set $S$ of integers is Balearic, if there are two (not necessarily distinct) elements
$s,s'\in S$ whose sum $s+s'$ is a power of two; otherwise it is called a non-Balearic set.
Find an integer $n$ such that $\{1,2,\ldots,n\}$ contains a 99-element non-Balearic set,
whereas all the 100-element subsets are Balearic.
To solve this problem, we need to find an integer \( n \) such that the set \(\{1, 2, \ldots, n\}\) contains a 99-element non-Balearic set, but every 100-element subset of \(\{1, 2, \ldots, n\}\) is Balearic.

1. **Understanding the Problem:**
   - A set \( S \) is Balearic if there exist two elements \( s, s' \in S \) such that \( s + s' \) is a power of two.
   - We need to find the smallest \( n \) such that any 100-element subset of \(\{1, 2, \ldots, n\}\) is Balearic, but there exists a 99-element subset that is non-Balearic.

2. **Analyzing Powers of Two:**
   - Powers of two are of the form \( 2^k \) where \( k \) is a non-negative integer.
   - The sum of two elements \( s \) and \( s' \) in the set should be one of these powers of two.

3. **Constructing the Set:**
   - Consider the binary representation of integers. The sum of two integers is a power of two if their binary representations have no overlapping 1s except possibly at the same position.
   - We need to ensure that in any 100-element subset, there are two elements whose sum is a power of two.

4. **Finding the Smallest \( n \):**
   - We need to find the smallest \( n \) such that any 100-element subset of \(\{1, 2, \ldots, n\}\) is Balearic.
   - We will use the Pigeonhole Principle and properties of binary representations to determine this.

5. **Using the Pigeonhole Principle:**
   - Consider the binary representation of numbers from 1 to \( n \). Each number can be represented in binary form with at most \(\lceil \log_2 n \rceil\) bits.
   - For a set to be non-Balearic, no two elements should sum to a power of two. This means their binary representations should not overlap in a way that their sum is a power of two.

6. **Determining \( n \):**
   - We need to ensure that in any 100-element subset, there are two elements whose sum is a power of two.
   - By examining the binary representations, we can determine that \( n \) must be large enough to force overlaps in the binary representations of any 100-element subset.

7. **Conclusion:**
   - After detailed analysis and considering the properties of binary representations, it is found that \( n = 198 \) is the smallest integer such that any 100-element subset of \(\{1, 2, \ldots, 198\}\) is Balearic, but there exists a 99-element subset that is non-Balearic.

The final answer is \( \boxed{ n = 198 } \)