好题: #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 5e6 + 5; const LL Mod = 1e9 + 7; #define INF 1e9 #define dbg(x) c ...
分类:
其他好文 时间:
2020-11-01 22:04:43
阅读次数:
23
#include <stdio.h> #include <stdlib.h> /* 定义结构体 */ typedef struct Node { int data; //数据域 struct Node * pNext;//指针域 }NODE, * PNODE; //由于使用了typedef, 所以N ...
分类:
其他好文 时间:
2020-11-01 22:00:48
阅读次数:
14
知识的迁移,题目意思的分析 T1:互质数对 显然,对于在线的题目,我们应该认真的思考(如果计算过于麻烦,我们是不是可以通过增量来计算) 推导过程: 第二步到第三步:因为每一个d要满足|ax和ay,所以对于每一个μ来说,只有对于每一个ax加入进来的约数,会产生的只有(ay中是d倍数的个数,记录并计算就 ...
分类:
其他好文 时间:
2020-10-31 02:00:49
阅读次数:
18
//顺序表基本运算算法 #include <stdio.h> #include <malloc.h> #define MaxSize 50 typedef int ElemType; typedef struct { ElemType data[MaxSize]; //存放顺序表元素 int len ...
分类:
数据库 时间:
2020-10-30 12:49:15
阅读次数:
16
1. 标准的卢卡斯定理加数位dp,主要是算C(n,i)*C(n,2*i)。 但由于这题的模数是质数,就不需要考虑很多东西,如:是否超过上限了、是否有连续的进位。 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ...
分类:
其他好文 时间:
2020-10-30 12:28:57
阅读次数:
17
#include <bits/stdc++.h> #include <bits/extc++.h> using namespace std; using namespace __gnu_pbds; typedef pair<int,int> pii; tree<pii,null_type,less< ...
分类:
其他好文 时间:
2020-10-21 20:30:50
阅读次数:
25
题:http://acm.hdu.edu.cn/showproblem.php?pid=3949 分析:对查询的k进行二进制分解位上线性基的异或和 #include<bits/stdc++.h> using namespace std; #define pb push_back typedef lo ...
分类:
其他好文 时间:
2020-10-12 20:30:09
阅读次数:
29
02-线性结构1 两个有序链表序列的合并 (15分) 本题要求实现一个函数,将两个链表表示的递增整数序列合并为一个非递减的整数序列。 函数接口定义: List Merge( List L1, List L2 ); 其中List结构定义如下: typedef struct Node *PtrToNod ...
分类:
其他好文 时间:
2020-10-07 20:31:41
阅读次数:
20
查询回文子串个数: #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<double,int> pii; const int N = 3e5+5; const int M = 1e6+5; c ...
分类:
其他好文 时间:
2020-10-05 22:16:55
阅读次数:
30
让我们先把没学完的IDFT放在这里 #include <stdio.h> #include <algorithm> #include <cstring> const int maxn=200000; typedef std:complex<double> com;//typedef 真实放前 def ...
分类:
其他好文 时间:
2020-09-24 21:58:31
阅读次数:
37