zoukankan      html  css  js  c++  java
  • Codeforces Round #195 (Div. 2)

    A. Vasily the Bear and Triangle

    • 考虑象限。

    B. Vasily the Bear and Fly

    • 问题相当于对于第一层的每个中心点,计算到第二层所有中心点的距离和。
    • 考虑横坐标的差值(d)
      1. (d=0),距离为(2R)
      2. (d=2R),距离为((2+sqrt2)R)
      3. (d>2R),距离为((d-1)R+2sqrt2R)

    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
  • 相关阅读:
    datatime模块
    快速幂
    | 与|| ,& 与&&
    sql----order by
    pandas iterrows()
    黄包车比赛 python学习
    右键git-bash不能使用
    17flask分页
    16flask错误处理
    15跨站请求伪造
  • 原文地址:https://www.cnblogs.com/mcginn/p/6654742.html
Copyright © 2011-2022 走看看