08 2022 档案

摘要:###模板 点击查看代码 struct CHT{ int q[maxn]; //存决策点标号 ll X(int pos){/* */} ll Y(int pos){/* */} double get_K(int x,int y){ return (double)(Y(x)-Y(y))/(double 阅读全文
posted @ 2022-08-25 23:05 I_N_V 阅读(17) 评论(0) 推荐(0) 编辑
摘要:1. D2. Xor-Subsequence (hard version) 题解 easy版本 点击查看代码 #include <bits/stdc++.h> #define ll long long #define pa pair<int,int> #define mp make_pair #de 阅读全文
posted @ 2022-08-19 13:58 I_N_V 阅读(18) 评论(0) 推荐(0) 编辑
摘要:1.Min酱要旅行 如果枚举每个选不选然后进行背包显然不行 反着考虑 设gi,j=ij=jijfj=j 因此gi,j=fjgi,jki 点击查看 阅读全文
posted @ 2022-08-11 23:09 I_N_V 阅读(30) 评论(0) 推荐(0) 编辑
摘要:##期望DP 期望dp都是从后往前考虑的 设状态基本为:设dpst从st状态到最终状态的期望 dpst=(dpst+w[st>st])p[st>st] ststp[st>st]stst $w[st 阅读全文
posted @ 2022-08-10 13:11 I_N_V 阅读(16) 评论(0) 推荐(0) 编辑
摘要:##模板 [CQOI2016]手机号码 点击查看代码 #include<functional> #include<algorithm> #include<iostream> #include<cstdlib> #include<cstring> #include<complex> #include< 阅读全文
posted @ 2022-08-05 12:40 I_N_V 阅读(22) 评论(0) 推荐(0) 编辑
摘要:1.郊区春游 设dpst,i表示当前状态为st,最后一个点为i的最短距离 dpst,i=minst,j(dpst,j+disj,i) 点击查看代码 #include<functional> #include<algorithm> #include<iost 阅读全文
posted @ 2022-08-04 13:48 I_N_V 阅读(23) 评论(0) 推荐(0) 编辑
摘要:1.二叉苹果树 树上背包 点击查看代码 #include<functional> #include<algorithm> #include<iostream> #include<cstdlib> #include<cstring> #include<complex> #include<string> 阅读全文
posted @ 2022-08-03 15:38 I_N_V 阅读(18) 评论(0) 推荐(0) 编辑

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