A. Vasily the Bear and Triangle
B. Vasily the Bear and Fly
- 问题相当于对于第一层的每个中心点,计算到第二层所有中心点的距离和。
- 考虑横坐标的差值\(d\):
- \(d=0\),距离为\(2R\)
- \(d=2R\),距离为\((2+\sqrt2)R\)
- \(d>2R\),距离为\((d-1)R+2\sqrt2R\)
C. Vasily the Bear and Sequence
- 枚举\(v\),对于所有\(a_i\ and\ 2^v = 2^v\)都要取,在不影响结果下,尽可能去除多余的1。
D. Vasily the Bear and Beautiful Strings
- 考虑\(00..01xxxx\),这种情况下,\(1x\)总是变成0,接下去就考虑前面\(0\)的奇偶性即可算出最后结果。
- 一些特殊情况要考虑,比如全0,全1,\(00..01\)这种情况。
E. Vasily the Bear and Painting Square
- 考虑最外面顶点可凑出的三角形。
- \(dp(level,op,qua,type)\)表示当前在第\(level\)层,\(op\)次操作(即三角形数),\(qua\)表示此时4个象限的占用情况,\(type\)表示此时三角形的类型。
- 具体参考Tutorial
posted @
2017-04-01 10:09
mcginn
阅读(
289)
评论()
编辑
收藏
举报