We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I had the idea of sampling the top row of pixels, and if the blue intensity was at least 0.5, I assume it's day. It pukes on testcase 7, though, so that's too naive...
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Digital Camera Autodetect: Day or Night
You are viewing a single comment's thread. Return to all comments →
I had the idea of sampling the top row of pixels, and if the blue intensity was at least 0.5, I assume it's day. It pukes on testcase 7, though, so that's too naive...