Most people don't actually apply for visas during YC and instead only once the 3 months are over (that is, if they want to stay in the US). This is because most western countries are a part of the Visa Waiver Program (I'm 99% sure Norway citizens are eligible for the VWP) which allows you to visit the US for up to 90 days at a time for business or pleasure (this means you'll have to go back to Norway for 1-2 weeks during the program and then just fly back). Whilst it's somewhat up for debate whether it's legal to use the VWP to do YC, most people do.
As for a place to stay, there is a fair bit of rental accommodation in the surrounding area of the YC office (Mountain View, Palo Alto, etc) and if you twist the arms of landlords of the properties (i.e. pay X amount of rent upfront), they'll generally let you get a place sorted pretty quickly. The YC network itself can also be a big help (we actually rented our first apartment in San Jose from a startup in our batch).
Airbnb is also a great resource to find a place to stay during your interview.