02 2020 档案
摘要:闲话 难度似乎比之前的简单了一些 但是难的题还是很难~~(我太菜了)~~ 总结 针对三个题,先罗列正解所涉及的算法:字符哈希,组合数学,点分治 ~~最后一个不会~~ 组合数学?~~还好吧~~ 字符哈希? ~~放在 应该不会很毒瘤把~~ 实际上 是签到题 别想概率DP了!
阅读全文
摘要:无聊的游戏 学校的运动会开始了,体能很菜的小可可没报任何比赛项目,于是和同学们玩一个十分无聊的游戏。 游戏在一个由n*n个方格组成的正方形棋盘上进行,首先在每个方格上均匀随机地填入1到m之间的正整数(每个方格填的数均不同),然后小可可均匀随机地选出k个1到m的数字(可
阅读全文
摘要:单词检索(search) 小可可是学校图书馆的管理员,现在他接手了一个十分棘手的任务。 由于学校需要一些材料,校长需要在文章中检索一些信息。校长一共给了小可可N篇文章,每篇文章为一个字符串。现在,校长需要他找到这样的单词,它至少在这N篇文章中的M篇文章里出现过,且单词
阅读全文
摘要:代码 #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[] ,
阅读全文
摘要:题目大意 构造一个分段函数来拟合若干点(),每一段是一个常函数,即 $$ f(x)= \left \{ \begin{aligned} a_1& & (0\leq x include using namespace std; const int N = 1e6; int n ,
阅读全文
摘要:```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
阅读全文
摘要:```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
阅读全文
摘要:```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
阅读全文
摘要:```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[
阅读全文
摘要:```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 >=
阅读全文
摘要:#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
阅读全文
摘要:```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
阅读全文
摘要:2020.02.16【NOIP提高组】模拟A 组 呼呼呼呼呼呼呼呼 今天暴力分可真多啊 第一次 组进前 ! 呼呼呼呼呼呼呼呼 总有人虐场,总有人在场中被虐······ 总结 30 + 100 + 40 = 140 :综合性很强的题,二项式定理,用线段树来维护,
阅读全文
摘要:代码 #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
阅读全文
摘要: 某一天,少年邂逅了同病相连的IA。见面后,IA一把牵起少年的手,决定和他一起逃离部落,离开这个无法容身的是非之地。 要逃离部落,少年和IA就需要先选择一条耗时最少的路线,从而避免被部落的大人们抓到。部落可以大致分为N个区域,少年和IA在区域1,部落的出口设在区域N。此外部
阅读全文
摘要:2020.02.01【NOIP提高组】模拟A 组 二月份第一场比赛 闲话 惨烈啊! 50+30+0=80分 一题都没A 唉 最高150? 暴虐A组 总结: 若干新东西 我连线段树优化 都不会? 暴力拿了 ?正解啥东西? 玄学 ,啥
阅读全文
摘要:在 的世界里 有一种题需要单调队列优化 一般在此时, 和它的决策集合 在转移时 不和 粘在一起(即所有的 转移到 时 关于 的部分全都与 无关), 果真如此,我们就可以用单调队列优化,留下
阅读全文