Where I work, they would be able to enter the building (yes, you can enter the building, and sit on a sofa, for example if it rains outside), but they wouldn't be able to enter the stairs or the lift or any office. They might be able to sneak in though and make it to our office door which involves following through at least two further doors.
They could then ring our door bell and someone would open the door. Not recognising them, they would ask who the person is and what the person wants, and not let them in. If the person pushes past them, I can tell you that you are in trouble which would involve police. If the person doesn't, someone in management would be called to check. If nobody with management responsibility is there, it might be me or some other senior developer going to the door.
Whoever goes to the door would not let him in. The person would be told that it is inappropriate to appear at the office after being rejected in a job interview. They might be told that turning up like this indicates that the decision was right. If you came through some recruiting agency, the agency would be told.
Just don't do it. In the best case it's a waste of everyone's time and not going to help you, and in the worst case you get yourself into trouble, may be remembered, and may have problems with your recruiting agency.