#include<cstdio>#include<cmath>#include<vector>#include<cstring>#include<algorithm>using namespace std;typedef long long LL;const int maxn = 2000005;int n, f[maxn], x;int main(){ f[0] = 1; for (int j = 0; (1 << j) < maxn; j++) for (int i = (1 << j); i < maxn; i++) (f[i] += f[i - (1 << j)]) %= 1000000; while (scanf("%d", &n) != EOF) { while (n--) { scanf("%d", &x); printf("%dn", f[x]); } } return 0;}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)