上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 48 下一页

AT2444 JOIOI 王国 (Kingdom of JOIOI)

摘要: "洛咕" "双倍经验" 题意:给定n行m列的矩阵,每个格子是一个有权值的小方块.将矩阵分成两个部分,要求每个部分内部的方块之间,可以通过上下左右相互到达,而且每个内部的方块之间互相到达,最多允许拐一次弯,使得两个部分的极差的较大值 最小.$n,m include include include in 阅读全文
posted @ 2019-09-20 16:55 PPXppx 阅读(236) 评论(0) 推荐(0)

[USACO11JAN]道路和飞机Roads and Planes

摘要: "洛咕" 题意:有n个点,m条无向边(权值非负),k条有向边(权值可能为负数),给定起点s,求出s点到每个点的最短路径长度.$n include include include include include include include define ll long long using nam 阅读全文
posted @ 2019-09-20 15:50 PPXppx 阅读(253) 评论(0) 推荐(0)

最优贸易

摘要: "洛咕" 题意:给定n个点m条边(有些单向,有些双向)的图,每个节点都有一个权值$w[i]$,找出一条从1到n的路径,使得路径上能够找出两个点$p,q$(先经过p再经过q),并且"节点q的权值减去节点p的权值"最大. 分析:在正向图上从1开始跑$spfa$,求出$dis1[i]$表示从节点1到节点i 阅读全文
posted @ 2019-09-20 14:52 PPXppx 阅读(181) 评论(0) 推荐(0)

[USACO08JAN]电话线Telephone Lines

摘要: "洛咕" 题意:给定$n(n include include include include include include include define ll long long using namespace std; inline int read(){ int x=0,o=1;char ch 阅读全文
posted @ 2019-09-20 14:33 PPXppx 阅读(141) 评论(0) 推荐(0)

对称二叉树

摘要: "洛咕" 题意:定义对称二叉树满足如下两个条件: 1.是一棵二叉树. 2.将这棵树所有节点的左右子树交换,新树和原树对应位置的结构相同且点权相等. 给定一棵$n(n include include include include include include include define ll l 阅读全文
posted @ 2019-09-19 22:19 PPXppx 阅读(150) 评论(0) 推荐(0)

小魔女帕琪

摘要: "洛咕" 题意:给定7个元素各自的数量,每次释放一个元素,一旦连续释放了7个不同的元素,则会释放出七重奏,求释放七重奏的期望次数. 分析:首先提醒一下如果释放元素顺序为1 2 3 4 5 6 7 1,则会有两次七重奏. 设$n=\sum_{i=1}^7a[i]$.对于每个位置$i$,从$i$开始的7 阅读全文
posted @ 2019-09-19 20:23 PPXppx 阅读(128) 评论(0) 推荐(0)

收集邮票

摘要: "洛咕" 题意:有$n(n include include include include include include include define ll long long using namespace std; inline int read(){ int x=0,o=1;char ch= 阅读全文
posted @ 2019-09-19 19:46 PPXppx 阅读(172) 评论(0) 推荐(0)

CF235B Let's Play Osu!

摘要: "洛咕" "双倍经验" "三倍经验" 题意:一个01串中每个长度为$X$的全1子串可贡献$X^2$的分数.给出$n$次操作的成功率$p[i]$(成功即为1,失败则为0),求期望分数. 分析:设$a[i]$表示前i位中第i位为1的长度的期望,$a[i]=(a[i 1]+1) p[i]$,即在前面$i 阅读全文
posted @ 2019-09-19 17:28 PPXppx 阅读(208) 评论(0) 推荐(0)

[SHOI2002]百事世界杯之旅

摘要: "洛咕" "双倍经验" 题意:每张彩票上有一个漂亮图案,图案一共n种,如果你集齐了这n种图案就可以兑换大奖.请问在理想(平均)情况下,你买多少张彩票才能获得大奖? 分析: "洛咕日报上看到的题" .上面讲了一点题解,反正我没看懂.总之结论就是$(\sum_{i=1}^n\frac{1}{i}) n. 阅读全文
posted @ 2019-09-19 15:26 PPXppx 阅读(152) 评论(0) 推荐(0)

路径统计

摘要: "洛咕" 给定n个点和m条有向边,$n include include include include include include include define ll long long using namespace std; inline int read(){ int x=0,o=1;ch 阅读全文
posted @ 2019-09-18 21:50 PPXppx 阅读(152) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 48 下一页