Given a sequence of integers $A_1,A_2,\cdots A_{99}$ such that for every sub-sequence that contains $m$ consecutive elements, there exist not more than $max\{ \frac{m}{3} ,1\}$ odd integers. Let $S=\{ (i,j) \ | i<j \}$ such that $A_i$ is even and $A_j$ is odd. Find $max\{ |S|\}$.
Problem
Source: Indonesia TSTST - Combinatoric
Tags: combinatorics, maximization, Indonesia, Indonesia TST