Well, you have to get 510 'EVs' by level 100. Every Pokemon will give you at least one, but some will give two or more. Things like Protein will give you 10. Pokerus will double the amount of EVs you get from battling Pokemon, but not for vitamins.
Which method you use to get to 510 EVs doesn't matter.
Which method you use to get to 510 EVs doesn't matter.