上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: 高效高效 分块。 here #include<bits/stdc++.h> using namespace std; int n,a[500010]; double dp[500010],sqr[500010]; double w(int j,int i) { return double(a[j]) 阅读全文
posted @ 2024-09-11 19:57 yzc_is_SadBee 阅读(35) 评论(0) 推荐(0)
摘要: 这个故事告诉我们,要全心全意赞美太阳。 题解 #include<bits/stdc++.h> using namespace std; const unsigned long long mod=998244353; struct data { int dp[3][3]; inline int* op 阅读全文
posted @ 2024-09-11 19:29 yzc_is_SadBee 阅读(15) 评论(0) 推荐(0)
摘要: 树状数组是个好东西 # include <bits/stdc++.h> # define Fill(a, b) memset(a, b, sizeof(a)) using namespace std; const int _(3e5 + 10), INF(2e9), PF(1e5); inline 阅读全文
posted @ 2024-09-11 18:55 yzc_is_SadBee 阅读(12) 评论(0) 推荐(0)
摘要: 概率期望谔谔谔。 #include<bits/stdc++.h> using namespace std; double f[1010][1010]; double g[1010][1010]; double C[1010][1010]; int main() { int n = ri, d = r 阅读全文
posted @ 2024-09-10 20:29 yzc_is_SadBee 阅读(19) 评论(0) 推荐(0)
摘要: 偷懒的新方法 但vector足以 #include<bits/stdc++.h> using namespace std; vector<int>v; inline int read() { char ch=getchar(); int x=0,f=1; for(; !isdigit(ch); ch 阅读全文
posted @ 2024-09-10 19:50 yzc_is_SadBee 阅读(14) 评论(0) 推荐(0)
摘要: 才发现蓝题以下的基本都被菜就多练的我刷掉了 from 0pts to 100pts 所以,这道题就是线段树+dp喽 #include<bits/stdc++.h> #define rep(k,l,r) for(long long k=l;k<=r;++k) #define per(k,r,l) fo 阅读全文
posted @ 2024-09-10 19:08 yzc_is_SadBee 阅读(29) 评论(0) 推荐(0)
摘要: 布什各门,阿? 令人惊奇的题解 标程:某个姓组合的数学+高精 here 阅读全文
posted @ 2024-09-09 20:25 yzc_is_SadBee 阅读(18) 评论(0) 推荐(0)
摘要: dp。 先把这个图像左右反转一下,这样方便dp f[j][i]代表前j列放i个的方案; v[j]代表第j列的高度; f[j][i]=(f[j-1][i]+f[j-1][i-1]*(v[j]-i+1))%mo; 答案就是f[a+c][m] #include<bits/stdc++.h> using n 阅读全文
posted @ 2024-09-09 20:14 yzc_is_SadBee 阅读(13) 评论(0) 推荐(0)
摘要: 切水题 没有切day9,10,11是因为泰难辣 #include<bits/stdc++.h> using namespace std; int fn[100001],fg[100001],n,k; int main(){ cin>>n>>k; fn[1]=1;//先赋初值 fg[1]=1; for 阅读全文
posted @ 2024-09-09 20:09 yzc_is_SadBee 阅读(39) 评论(0) 推荐(0)
摘要: 高效高效,坚持高效,耶( •̀ ω •́ )y 首先,我们考虑引爆每个炸弹,它能引爆的区间是多少(即:它能对答案做出什么贡献) 易得炸一个=炸这个区间 为什么? 你只要引爆了一个大炸弹(例如沙皇) 它就会把它的左边和右边一起抬走 所以考虑线性维护每个炸弹向左/向右能炸到哪里 代码十分精华: #inc 阅读全文
posted @ 2024-09-09 19:36 yzc_is_SadBee 阅读(46) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 下一页