There are $n$ distinct balls. In how many ways can they be partitioned into $m$ parts so that first $o$ parts have odd number of balls and second $e$ parts have even number of balls? Here $o+e\le m$. Some parts can get $0$ balls. Order of partition matters: giving $1$ balls to first part and $3$ balls to second part differs from giving $3$ to first part and $1$ to second part.
We could write $$2(x_1+\cdots+x_{o})+o+2(x_{o+1}+\cdots +x_{o+e})+x_{o+e+1}+\cdots+x_m=n$$ and proceed but the balls are distinct so which ball goes in which group matters. How to approach it?
For example if $n=2,m=2,o=2,e=0$ then there are two ways to do this. If the $2$ balls are $x,y$ then partition can be: $(x,y)$ or $(y,x)$.