上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页

2020年3月28日

Codeforces Round #629 (Div. 3) E. Tree Queries(lca题)

摘要: https://codeforces.com/contest/1328/problem/E E. Tree Queries You are given a rooted tree consisting of nn vertices numbered from 11 to nn. The root o 阅读全文

posted @ 2020-03-28 21:28 Aminers 阅读(227) 评论(0) 推荐(0) 编辑

2020年3月26日

Problem A. Balanced Fighters

摘要: Problem A. Balanced Fighters https://codeforces.com/group/5yyKg9gx7m/contest/273522/problem/B 题目描述: 每2个fighter之间打。问A打赢B,B打赢C,C打赢A的组合有多少个。(输出顺序任意,但每组只能 阅读全文

posted @ 2020-03-26 15:05 Aminers 阅读(196) 评论(0) 推荐(0) 编辑

2020年3月22日

J - Largest Rectangle in a Histogram HDU - 1506

摘要: J - Largest Rectangle in a Histogram HDU - 1506 题目描述: 一个柱形图,求一个贴着x轴的矩形的最大面积。 分析: 可以看出是从一个点向左和右扩张,只要比i高,都可以作为扩张对象。 所以记录L[i],R[i]为i的左边界和右边界。如果暴力i--记为L,i 阅读全文

posted @ 2020-03-22 21:20 Aminers 阅读(104) 评论(0) 推荐(0) 编辑

2020年3月15日

L - Round Numbers POJ - 3252

摘要: L - Round Numbers POJ - 3252 http://poj.org/problem?id=3252 题目描述: 求l到r里面二进制数0的数量>=1的数量的数,有多少个。 分析: 把数分成二进制数,用数位dp。dp[pos] [num_0] [num_1]表示第pos位0的数量位n 阅读全文

posted @ 2020-03-15 16:33 Aminers 阅读(68) 评论(0) 推荐(0) 编辑

2020年3月13日

N - F(x) HDU - 4734

摘要: N - F(x) HDU - 4734 http://acm.hdu.edu.cn/showproblem.php?pid=4734 题目描述: 0~B里面,F(b)<=F(A)的有多少个。 F(x)=A n * 2 n-1 + A n-1 * 2 n-2 + ... + A 2 * 2 + A 1 阅读全文

posted @ 2020-03-13 01:18 Aminers 阅读(144) 评论(0) 推荐(0) 编辑

2020年3月12日

Problem F Flipping Coins

摘要: Problem F Flipping Coins Here’s a jolly and simple game: line up a row of N identical coins, all with the heads facing down onto the table and the tai 阅读全文

posted @ 2020-03-12 13:28 Aminers 阅读(216) 评论(0) 推荐(0) 编辑

2020年3月10日

E. Milk Visits

摘要: E. Milk Visits https://codeforces.com/group/5yyKg9gx7m/contest/269717/problem/E 题目描述: 农夫约翰计划建造N(1≤N≤105)个农场,这些农场将通过N-1条道路连接起来,形成一棵树(即,所有农场彼此之间都是可到达的,没 阅读全文

posted @ 2020-03-10 21:50 Aminers 阅读(137) 评论(0) 推荐(0) 编辑

2020年3月9日

P - Discovering Gold LightOJ - 1030

摘要: P - Discovering Gold LightOJ - 1030 https://vjudge.net/contest/349029#problem/P 题目描述: 长为n的山洞,从0出发,每次掷一个6面的色子,得到的点数x。假设当前位置i,如果i+x<=n,就移动到i+x。否则再掷一次。直到 阅读全文

posted @ 2020-03-09 22:29 Aminers 阅读(99) 评论(0) 推荐(0) 编辑

J - Kejin Player HDU - 6656

摘要: J - Kejin Player HDU - 6656 https://vjudge.net/contest/349029#problem/J 题目描述: 花费a[i],从i升到i+1级有p[i]的可能成功,失败就掉到x[i]级。问从l升到r级的期望。 分析: dp[i]表示从1级升到i级的期望,如 阅读全文

posted @ 2020-03-09 18:17 Aminers 阅读(191) 评论(0) 推荐(0) 编辑

2020年3月6日

F - Dice (III) LightOJ - 1248

摘要: F - Dice (III) LightOJ - 1248 题目描述: 掷出有n面的色子的全部面,求他的期望。 分析: 期望dp,假设掷出i面,dp[i]表示掷出i面的期望。每次会掷出2种情况:1.掷出不同的面,转移到i+1面,概率为(n-i)/n。2.掷出相同的,状态还是i面,概率为i/n。 且花 阅读全文

posted @ 2020-03-06 10:05 Aminers 阅读(100) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页

导航