You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
虽然代码中没有用到g(k, i)这个函数,但其计算方式出现错误
if (i >= k2) return g(k - 1, i - k2) + count(k - 1);这是源代码中的那个式子
但实际应为if (i >= k2) return g(k - 1, i - k2) * 2 + count(k - 1);
仔细想象一下并不困难,左下角一个整体的方块,加上上面两块残缺的区域
这道题用的f(k, b) - f(k, a - 1)来表示的答案
同理答案也等于g(k, l - a + 1) - g(k, l - b), l is 1 << k
The text was updated successfully, but these errors were encountered:
虽然代码中没有用到g(k, i)这个函数,但其计算方式出现错误
if (i >= k2) return g(k - 1, i - k2) + count(k - 1);这是源代码中的那个式子
但实际应为if (i >= k2) return g(k - 1, i - k2) * 2 + count(k - 1);
仔细想象一下并不困难,左下角一个整体的方块,加上上面两块残缺的区域
这道题用的f(k, b) - f(k, a - 1)来表示的答案
同理答案也等于g(k, l - a + 1) - g(k, l - b), l is 1 << k
The text was updated successfully, but these errors were encountered: