设f[i]为i这个数的划分方案,则: 1.i是奇数的时候,最前面只能放1,所以f[i] = f[i-1] 2.i是偶数的时候,最前面可以放1也可以不放1,而不放1的时候数列都是偶数所以 f[i] = f[i-1] + f[i>>1]. #include<bits/stdc++.h> #define ll long long using namespace std; const int ha=1000000007; const int maxn=1000005; int f[maxn…
Prime Test Time Limit: 6000MS Memory Limit: 65536K Total Submissions: 29193 Accepted: 7392 Case Time Limit: 4000MS Description Given a big integer number, you are required to find out whether it's a prime number. Input The first line contains the num…
进入a b 多少努力p, q 使p*q == a && p < q && p >= b 直接大整数分解 然后dfs所有可能的解决方案劫持 #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <cmath> using namespace std; typedef long long L…