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.
hard question, finally got it working after numerous modifications to improve time. hint: dont use pow(2, K), it's slow as fk, precompute the powers of 2 and 10
calculating global information requires O(300000 * 19 * 10).
let A be the x'th decibinary number. each query for x <= 10^16 takes
O(log_2(300000) + log_10(A))
Decibinary Numbers
You are viewing a single comment's thread. Return to all comments →
hard question, finally got it working after numerous modifications to improve time. hint: dont use pow(2, K), it's slow as fk, precompute the powers of 2 and 10
calculating global information requires O(300000 * 19 * 10). let A be the x'th decibinary number. each query for x <= 10^16 takes O(log_2(300000) + log_10(A))
pass all tests no timeout