Hariyama is a niche and difficult pokemon to use since he doesn't offer many resistances to a team and because he is very slow. The entire metagame outruns him. Paralysis or Trick Room support can help him a bit, but he still has trouble competing for a team slot.
Hariyama has a lot of flexibility in terms of EVs. He doesn't need to invest in attack EVs, but he has the ability to use some. He doesn't need to use HP EVs since his HP is already high, but he still has the ability to use them.

Hariyama @ Leftovers
Ability: Guts / Thick Fat
EVs: 4 Atk / 252 Def / 252 SpD
Adamant Nature
- Ice Punch / Payback
- Stone Edge / Payback
- Revenge / Force Palm / Close Combat
- Bulk Up
After a Bulk Up, this Hariyama has 424 HP, 456 attack, 328 defense, and 219 special defense. This makes him bulkier than Relaxed 252 HP / 6 Atk / 252 Def Swampert. With his type coverage and bulk, he can be threatening to offense teams and stall.
Without a bulk up, a lot of pokemon are going to have trouble OHKOing him. This allows him to check random pokemon. Against offense, he's tanky enough to survive a hit from random pokemon and KO them back.
Tanks Mixed Dragonite's Draco Meteor.
252+ SpA Life Orb Dragonite Draco Meteor vs. 0 HP / 252 SpD Hariyama: 294-346 (68.5 - 80.6%) -- guaranteed 2HKO after Leftovers recovery
Tanks Choice Band Dragonite's Outrage after a Bulk Up.
252+ Atk Choice Band Dragonite Outrage vs. +1 0 HP / 252 Def Hariyama: 237-280 (55.2 - 65.2%) -- guaranteed 2HKO after Leftovers recovery