随笔分类 - 其他
摘要:1 #include 2 #include 3 #include 4 5 #define MOD 1000000007 6 using namespace std; 7 8 long long quick_pow(long long a, long long b, long long c){ 9 long long ans = 1; 10 a = a%...
阅读全文
摘要:熟练使用map即可,不然用vector会超时
阅读全文
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 typedef long long LL; 6 const int maxn = 10000 + 5; 7 int a[maxn]; 8 LL sum[maxn]; 9 10 int main(){ 11 std::ios::sync_with_s...
阅读全文
摘要:如果将第二位看成第一位,那么 k * (k+1) / 2都是1,k >= 1,那么其他位都是 0 所以如果n-1=k*(k+1)/2 (n>1),则该位就是1
阅读全文
摘要:具体题解发一下大佬的分析http://blog.csdn.net/wyg1997/article/details/52169036
阅读全文
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 6 int prime[40]; 7 int c1[151]; 8 int c2[151]; 9 int num[151]; 10 int l; 11 void init() 12 { 13 int i,j; 14 num[0]=1; 15...
阅读全文