
概率-期望
flaaaaaaame
Hope is floating on the breeze.
展开
-
Luogu P1850 [NOIp提高组2016]换教室
题目描述 传送门作为蒟蒻的我不懂概率,不懂期望QWQ。看别人的题解裸地期望DP似懂非懂。先写一下吧,以后再做应该会更能理解的。代码#include<cstdio> #include<cstring> #include<algorithm> #include<iostream> using namespace std; const int maxn=2010,maxv=305; int a[maxn]原创 2017-09-14 18:00:02 · 428 阅读 · 0 评论 -
Luogu P1600 [NOIp提高组2016]天天爱跑步
题目描述 传送门我觉得好难好难啊,看题解我都看不懂(我觉得实现起来有点麻烦)。 总结一下: 首先也许可以想出S=1和T=1的数据的做法,然后想到把S->T路径拆成S->LCA和LCA->T. 然后要想到一个点i可观测到的人一定满足: S->LCA路径: depth[i]+w[i]=depth[S]depth[i]+w[i]=depth[S] LCA->T路径: distance(S原创 2017-09-19 13:54:19 · 732 阅读 · 0 评论