摘要:
考试题传送门 我靠为啥考场一个不会,下来做觉得除了 T1 水的一批啊 T4被 Hack 没资格说水/lb T1 实 在 不 会 /kk 观摩一下 @Blueqwq 彁彁の Random 吧 #include <bits/stdc++.h> #define int long long usin 阅读全文
posted @ 2021-07-14 20:07
BFNewdawn
阅读(30)
评论(0)
推荐(0)
摘要:
Program in C++14 据说某位神犇说过:数位DP就是抄板子的日常 对不对先不说但是要是谁有板子给我一个,数位DP确实有套路 T1:P2606 模板题不讲 如果需要,这里有神犇 \mathtt{zrt} 的视频。私信我领取,从 \mathtt{1:01:30} 开看 阅读全文
posted @ 2021-07-14 20:04
BFNewdawn
阅读(27)
评论(0)
推荐(0)
摘要:
不要问我为啥鸽到6.5 Program in C++14 T1:P1474 一道完全背包 就一元一元的凑 易得状态转移方程: f[j]+=f[j-m[i]]; 其中 f[j] 代表凑成 j 元有 f[j] 种方法, m[i] 代表第 i 个 阅读全文
posted @ 2021-07-14 20:02
BFNewdawn
阅读(38)
评论(0)
推荐(0)
摘要:
扩展欧拉定理 #include<bits/stdc++.h> using namespace std; typedef long long ll; ll a,b,m,phi; string s; ll calc_phi(ll x){ ll ret=x; for(int i=2;i<=sqrt(x); 阅读全文
posted @ 2021-07-14 20:00
BFNewdawn
阅读(39)
评论(0)
推荐(0)
摘要:
0x00 前言 艹,我怎么就没想到大模拟呢 0x01 读题 …… 0x02 分析 区间dp没什么好说的 我们通过一个w[i]存储计数的大小,从一位到三位,所以还有一个方程 当然f的初始化也很重要。我tm卡了半个小时就是因为我赋值大了 memset(f,0x3f,sizeof(f) 阅读全文
posted @ 2021-07-14 19:58
BFNewdawn
阅读(37)
评论(0)
推荐(0)
摘要:
0x01 读题 …… 0x02 分析 数据范围巨大(n\leq10^{18}),显然不能用常见的递推求解。发现考点是快速幂 C^x_y=\dfrac{n!}{i!(n-i)!} 问题转化为求 \(\sum\limits_{i=0}^n \dfrac{\prod\limits_{k 阅读全文
posted @ 2021-07-14 19:56
BFNewdawn
阅读(34)
评论(0)
推荐(0)
摘要:
0x00 前言 自己整了个翻译呢 一开始写的超级复杂 后开借鉴别人思路才知道其实不长 0x01 读题 在团队队列中,每个元素都属于一个团队。 如果元素进入队列。它首先从头到尾搜索队列,检查它的一些团队成员(同一团队的元素)是否已经在队列中。如果是,它就插入它们的后面。如果不是,它将在尾部进入队列并成 阅读全文
posted @ 2021-07-14 19:52
BFNewdawn
阅读(179)
评论(0)
推荐(0)
摘要:
题目传送门 我记得我刚学OI时教练wangk就讲过,鸽到现在才写与其是弱智题解,不如说是纪念 还挺简单的,就是个记忆法搜索模板题 #include<algorithm> #include<bitset> #include<cctype> #include<cerrno> #include<cloca 阅读全文
posted @ 2021-07-14 19:51
BFNewdawn
阅读(35)
评论(0)
推荐(0)
摘要:
前情提示:会TLE,吸口氧可以过 先想到:对于一个系统,当且仅当前面的数凑得出来这个数 之后就像一个完全背包了 Code: #include<algorithm> #include<bitset> #include<cctype> #include<cerrno> #include<clocale> 阅读全文
posted @ 2021-07-14 19:49
BFNewdawn
阅读(59)
评论(0)
推荐(0)
摘要:
草了 我不得不承认我孤陋寡闻了 因为这是我见到的第一道卡MLE的题 前几次提交 (60 - 80pts): #include<algorithm> #include<bitset> #include<cctype> #include<cerrno> #include<clocale> #in 阅读全文
posted @ 2021-07-14 19:46
BFNewdawn
阅读(51)
评论(0)
推荐(0)