INCLUSION EXCLUSION PRINCIPLE IMPLEMENTATION IN C++

Can anyone suggest me how to code inclusion exclusion principle in c++?

these are few useful k=links

Terima kasih dan salam kenal.
codechef Link

code Link