02 2020 档案

摘要:闲话 难度似乎比之前的简单了一些 但是难的题还是很难~~(我太菜了)~~ 总结 针对三个题,先罗列正解所涉及的算法:字符哈希,组合数学,点分治 ~~最后一个不会~~ 组合数学?~~还好吧~~ 字符哈希? ~~放在 T1 应该不会很毒瘤把~~ 实际上 T1 是签到题 T2 别想概率DP了! 阅读全文
posted @ 2020-02-27 10:06 leiyuanze 阅读(138) 评论(0) 推荐(0) 编辑
摘要:无聊的游戏 Description 学校的运动会开始了,体能很菜的小可可没报任何比赛项目,于是和同学们玩一个十分无聊的游戏。 游戏在一个由n*n个方格组成的正方形棋盘上进行,首先在每个方格上均匀随机地填入1到m之间的正整数(每个方格填的数均不同),然后小可可均匀随机地选出k个1到m的数字(可 阅读全文
posted @ 2020-02-26 19:40 leiyuanze 阅读(221) 评论(0) 推荐(0) 编辑
摘要:单词检索(search) Description 小可可是学校图书馆的管理员,现在他接手了一个十分棘手的任务。 由于学校需要一些材料,校长需要在文章中检索一些信息。校长一共给了小可可N篇文章,每篇文章为一个字符串。现在,校长需要他找到这样的单词,它至少在这N篇文章中的M篇文章里出现过,且单词 阅读全文
posted @ 2020-02-26 19:37 leiyuanze 阅读(1223) 评论(0) 推荐(0) 编辑
摘要:题目大意 给出 n,求一组 x,y,z 满足 1x+1y+1z=2n 若不存在合法的解,输出 1 其中 n104 要求答案中的 x,y,z2109 思路 让人无语的 阅读全文
posted @ 2020-02-22 19:22 leiyuanze 阅读(142) 评论(0) 推荐(0) 编辑
摘要:代码 阅读全文
posted @ 2020-02-22 18:27 leiyuanze 阅读(111) 评论(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 阅读(99) 评论(0) 推荐(0) 编辑
摘要:题目大意 构造一个分段函数来拟合若干点(xi,yi),每一段是一个常函数,即 $$ 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 阅读(208) 评论(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 阅读(176) 评论(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 阅读(116) 评论(0) 推荐(0) 编辑
摘要:代码 (树链剖分) 阅读全文
posted @ 2020-02-20 19:34 leiyuanze 阅读(169) 评论(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 阅读(153) 评论(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 阅读(176) 评论(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 阅读(138) 评论(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 阅读(105) 评论(0) 推荐(0) 编辑
摘要:代码 阅读全文
posted @ 2020-02-20 19:20 leiyuanze 阅读(95) 评论(0) 推荐(0) 编辑
摘要:代码 阅读全文
posted @ 2020-02-20 19:18 leiyuanze 阅读(174) 评论(0) 推荐(0) 编辑
摘要:代码 阅读全文
posted @ 2020-02-20 19:15 leiyuanze 阅读(845) 评论(0) 推荐(0) 编辑
摘要:代码 阅读全文
posted @ 2020-02-20 19:12 leiyuanze 阅读(158) 评论(0) 推荐(0) 编辑
摘要:2020.02.16【NOIP提高组】模拟A 组 呼呼呼呼呼呼呼呼 今天暴力分可真多啊 第一次 A 组进前 5 ! 呼呼呼呼呼呼呼呼 总有人虐场,总有人在场中被虐······ 总结 30 + 100 + 40 = 140 T1:综合性很强的题,二项式定理,用线段树来维护,6 阅读全文
posted @ 2020-02-16 22:38 leiyuanze 阅读(134) 评论(0) 推荐(0) 编辑
摘要:代码 #include<cstdio> #include<algorithm> using namespace std; const int N = 200000; int f[N + 5] , g[N + 5] , h[N + 5] , son[N + 5] , res[N + 5] , Maxl 阅读全文
posted @ 2020-02-16 22:28 leiyuanze 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Description 某一天,少年邂逅了同病相连的IA。见面后,IA一把牵起少年的手,决定和他一起逃离部落,离开这个无法容身的是非之地。 要逃离部落,少年和IA就需要先选择一条耗时最少的路线,从而避免被部落的大人们抓到。部落可以大致分为N个区域,少年和IA在区域1,部落的出口设在区域N。此外部 阅读全文
posted @ 2020-02-16 22:26 leiyuanze 阅读(610) 评论(0) 推荐(0) 编辑
摘要:[SDOI2015]约数个数和 闲话:莫比乌斯反演经典题 题目大意 求 i=1nj=1mσ0(ij) T 组数据,且 1T,n,m50000 良心样例 输入样例 2 7 4 5 6 输出样例 110 121 阅读全文
posted @ 2020-02-15 18:01 leiyuanze 阅读(283) 评论(0) 推荐(0) 编辑
摘要:2020.02.01【NOIP提高组】模拟A 组 二月份第一场比赛 闲话 惨烈啊! 50+30+0=80分 一题都没A 唉 最高150? zzh 暴虐A组 总结: 若干新东西 T1 我连线段树优化 dp 都不会? T2 暴力拿了 30 ?正解啥东西? T3 玄学 dp,啥 阅读全文
posted @ 2020-02-12 16:12 leiyuanze 阅读(151) 评论(0) 推荐(0) 编辑
摘要:本章学习斜率优化建图 请放心食用 引言 最小生成树(mst) (Algorithm:Prim or Kruskal) 从裸题到一丁点技巧,再到丧心病狂的神仙题 原始时间复杂度 O(N2)O(MlogM) 永远的 TLE ······ 正话 本文第一句 阅读全文
posted @ 2020-02-12 16:07 leiyuanze 阅读(310) 评论(0) 推荐(0) 编辑
摘要:在 DP 的世界里 有一种题需要单调队列优化 DP 一般在此时,fi 和它的决策集合 fj 在转移时 i 不和 j 粘在一起(即所有的 j 转移到 i时 关于j 的部分全都与 i无关), 果真如此,我们就可以用单调队列优化,留下 阅读全文
posted @ 2020-02-06 16:40 leiyuanze 阅读(286) 评论(1) 推荐(1) 编辑

点击右上角即可分享
微信分享提示