You probably shouldn't do it unless someone says you can anyway, because not everyone wants all these people to just randomly kiss them. It can be gross and rapey if there's no consent.
i'm not sure you get the idea. it's not gross or rapey, at least not to anyone i know.. this is how the scenario plays out: i'm with a group of people of mixed genders. when i leave i usually give all the guys some type of handshake bro-hug thingy and all the girls some type of sidecheek hug thingy. i never initiate the sidecheek thingy cause i find it a bit awkward unless it's a girl i really know well. in all other cases i wait for a girl to say bye and initiate it. so it's not something someone says you can do, it's just something people do. although it be nice if someone would just say if i could do it, cause everyone else is freely doing it and i just feel awkward and then i think, "hey maybe that girl thinks i'm rude or don't like her because i'm not greeting her or saying hi in the appropriate fashion that everyone else is doing."
edit: why can't i just give everyone a firm handshake and a half-nod.