摘要: 单词检索(search) \(Description\) 小可可是学校图书馆的管理员,现在他接手了一个十分棘手的任务。 由于学校需要一些材料,校长需要在文章中检索一些信息。校长一共给了小可可N篇文章,每篇文章为一个字符串。现在,校长需要他找到这样的单词,它至少在这N篇文章中的M篇文章里出现过,且单词 阅读全文
posted @ 2020-02-26 19:37 leiyuanze 阅读(1148) 评论(0) 推荐(0) 编辑
摘要: 题目大意 给出 \(n\),求一组 \(x,y,z\) 满足 \(\frac 1x + \frac 1y + \frac 1z = \frac 2n\) 若不存在合法的解,输出 \(-1\) 其中 \(n \le 10^4\) 要求答案中的 \(x,y,z \le 2*10^9\) 思路 让人无语的 阅读全文
posted @ 2020-02-22 19:22 leiyuanze 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 代码 阅读全文
posted @ 2020-02-22 18:27 leiyuanze 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 代码 #include<cstdio> using namespace std; const int N = 1e5; double fx[N + 5] , fy[N + 5] , g[N + 5]; int x , y; inline void getp(int n , double f[] , 阅读全文
posted @ 2020-02-22 18:25 leiyuanze 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 题目大意 构造一个分段函数来拟合若干点($x_i , y_i$),每一段是一个常函数,即 $$ f(x)= \left \{ \begin{aligned} a_1& & (0\leq x include using namespace std; const int N = 1e6; int n , 阅读全文
posted @ 2020-02-22 18:23 leiyuanze 阅读(192) 评论(0) 推荐(0) 编辑
摘要: ```cpp #include using namespace std; typedef long long LL; LL n , k , p = 1e9 + 7; inline LL fpow(LL x , LL y) { LL res = 1; while (y) { if (y & 1) res = res * x % p; x = x * x % p , y >>= 1; } return 阅读全文
posted @ 2020-02-20 19:38 leiyuanze 阅读(174) 评论(0) 推荐(0) 编辑
摘要: ```cpp #include #include using namespace std; const int M = 10000; const double inf = 1e18; int n , m , h[505] , cur[505] , dep[505] , s , t , tot = 1; double a[55] , b[55] , ans , Max; struct edge{ i 阅读全文
posted @ 2020-02-20 19:37 leiyuanze 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 代码 (树链剖分) 阅读全文
posted @ 2020-02-20 19:34 leiyuanze 阅读(164) 评论(0) 推荐(0) 编辑
摘要: ```cpp #include #include using namespace std; typedef long long LL; const int N = 1 = 4) return; c[++tot] = i , c[++tot] = i + 1; } if (!tot) return; for(register int i = 1; i <= tot; i++) for(registe 阅读全文
posted @ 2020-02-20 19:33 leiyuanze 阅读(152) 评论(0) 推荐(0) 编辑
摘要: ```cpp #include #include using namespace std; const int N = 210 , M = 210000 , INF = 2147483647; int a[N + 5][N + 5] , b[N + 5][N + 5] , n , m , s , t , ans; char str[N + 5]; int dep[N * N + 5] , cur[ 阅读全文
posted @ 2020-02-20 19:32 leiyuanze 阅读(173) 评论(0) 推荐(0) 编辑
摘要: ```cpp #include #include #include #include using namespace std; typedef long long LL; const int N = 1e5; int n , lim , x[N + 5] , y[N + 5] , z[N + 5] , sum; int bl[(N '9'; ch = getchar()); for(; ch >= 阅读全文
posted @ 2020-02-20 19:26 leiyuanze 阅读(88) 评论(0) 推荐(0) 编辑
摘要: #pragma GCC optimize(2) #pragma GCC optimize(3) #include<cstdio> using namespace std; const int N = 30000; const double INF = 1e8; int n , l , a[N + 5 阅读全文
posted @ 2020-02-20 19:24 leiyuanze 阅读(133) 评论(0) 推荐(0) 编辑
摘要: ```cpp #include #include using namespace std; typedef long long LL; const int N = 1e6; LL x , a , b , c , m , f[N + 10] , p; int n , len , vis[N + 10]; inline LL fpow(LL x , int y , LL p) { LL res = 1 阅读全文
posted @ 2020-02-20 19:22 leiyuanze 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 代码 阅读全文
posted @ 2020-02-20 19:20 leiyuanze 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 代码 阅读全文
posted @ 2020-02-20 19:18 leiyuanze 阅读(171) 评论(0) 推荐(0) 编辑