A subset $B$ of $\{1, 2, \dots, 2017\}$ is said to have property $T$ if any three elements of $B$ are the sides of a nondegenerate triangle. Find the maximum number of elements that a set with property $T$ may contain.
1. Let \( B = \{b_1, b_2, \ldots, b_{|B|} \} \) where \( b_1 < b_2 < \ldots < b_{|B|} \) and \( |B| \ge 3 \).

2. We need to show that \( B \) satisfies property \( T \) if and only if \( b_1 + b_2 > b_{|B|} \).

3. **Proof:**
   - If \( b_1 + b_2 > b_{|B|} \), then for any \( 1 \le i < j < k \le |B| \), we have \( b_i + b_j \ge b_1 + b_2 > b_{|B|} \ge b_k \). Therefore, \( b_i + b_j > b_k \) for any \( i, j, k \), and \( T \) is satisfied.
   - Conversely, if \( b_1 + b_2 \le b_{|B|} \), then \( b_1, b_2, b_{|B|} \) cannot form a non-degenerate triangle, violating property \( T \).

4. We now show that if \( B \) satisfies property \( T \), then \( |B| \le 1009 \).

5. Assume \( |B| \ge 1010 \) and \( B \) satisfies \( T \). Then, consider the smallest and largest elements in \( B \):
   - Let \( b_1, b_2, \ldots, b_{|B|} \) be the elements of \( B \) in increasing order.
   - Since \( B \) satisfies \( T \), we must have \( b_1 + b_2 > b_{|B|} \).

6. To find a contradiction, consider the elements \( b_{|B|-1009}, b_{|B|-1008}, \ldots, b_{|B|} \):
   - Note that \( b_{|B|-1009} \le b_{|B|} - 1009 \) and \( b_{|B|-1008} \le b_{|B|} - 1008 \).
   - Therefore, \( b_1 + b_2 \le (b_{|B|} - 1009) + (b_{|B|} - 1008) = 2b_{|B|} - 2017 \).

7. Since \( b_1 + b_2 > b_{|B|} \), we have:
   \[
   b_{|B|} < 2b_{|B|} - 2017 \implies b_{|B|} > 2017
   \]
   - This is a contradiction because \( b_{|B|} \) is an element of \( \{1, 2, \ldots, 2017\} \).

8. Therefore, \( |B| \le 1009 \).

9. We can achieve \( |B| = 1009 \) by setting \( B = \{1009, 1010, \ldots, 2017\} \):
   - For any three elements \( a, b, c \) in \( B \), we have \( a + b > c \) because the smallest sum \( 1009 + 1010 = 2019 \) is greater than the largest element \( 2017 \).

10. Thus, the maximum number of elements that a set with property \( T \) may contain is \( 1009 \).

The final answer is \(\boxed{1009}\).