摘要:
https://www.luogu.com.cn/problem/UVA12230 期望的线性性质 设初始答案 A,为全走陆地的时间 D,则每次输入时去河的长度 L,加上渡河期望时间 2* L/v #include<iostream> #include<cstring> #include<algor 阅读全文
posted @ 2023-04-09 15:58
towboat
阅读(15)
评论(0)
推荐(0)
摘要:
有高度分别为1到n的n根杆子排成一行。如果你从左侧或右侧看这些杆,较小的杆被较高的杆遮挡。 给出杆子的数量n,从左能看到的杆子数量L,从右能看到的杆子数量R,求杆子有多少种排列方式 考虑高度1~n的柱子, 把高度1的插入 2~i 的某个排列中转移 f[i ][j] [k ]=f[i-1][j-1][ 阅读全文
posted @ 2023-04-09 15:36
towboat
阅读(15)
评论(0)
推荐(0)
摘要:
两人赛马,最终名次有3种可能 求n人赛马时最终名次的可能性的个数 #include<iostream> #include<cstring> #include<algorithm> #include<set> using namespace std; #define mod 10056 int c[1 阅读全文
posted @ 2023-04-09 12:45
towboat
阅读(11)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<cstring> #include<algorithm> #include<set> using namespace std; int f[44],n; signed main() { int i; f[3]=1,f[4]=3; for(i=5 阅读全文
posted @ 2023-04-09 12:06
towboat
阅读(16)
评论(0)
推荐(0)