Solution:
We denote by (i,j) the cell in the i-th line and in the j-th column for every 1≤i,j≤n. Bob associates the following pair of cells: (i,2k+1),(i,2k+2) for 1≤i≤100 and 0≤k≤49 except for (i,k)=(100,0) and (100,1), and the pairs (100,1),(100,3) and (100,2),(100,4).
Each time Alice writes the number j in one of the cells, Bob writes the number 1002+1−j in the other cell of the pair.
One can prove by induction that after each of Bob's turns, for each pair of cells, either there is a number written in each of the cells of the pair, or in neither of them. And that if a number j is written, 1002+1−j is also written. Thus Bob can always apply the previous strategy (since j=1002+1−j is impossible).
At the end, every line has sum (1002+1)×50.
Assume by contradiction that Alice can stop Bob from winning if he applies this strategy. Let cj be the sum of the numbers in the j-th column for 1≤j≤100: then cj≤50(1002+1). Note that:
100×50(1002+1)≥c1+⋯+c100=1+⋯+1002=21002(1002+1)=100×50(1002+1)
Thus we have equality in the previous inequality: c1=⋯=c100=50(1002+1). But if a is the number written in the cell (100,1) and b the number written in the cell (100,2), then c1−b+c2−c=99(1002+1). Thus b+c=100(1002+1)−99(1002+1)=1002+1: by hypothesis c is also written in the cell (100,3) which is a contradiction.
Thus Bob has a winning strategy.