zoukankan      html  css  js  c++  java
  • 「游记」Codeforces Round #729 (Div. 2)

    水平还是菜啊,开始25分钟做了A和B,直到结束也就只做了A和B,不过这场出题人是毒瘤的中国人。但加完rating还是newbie,QwQ

    官方题解

    A. Odd Set

    问给出的 (2*n) 个数之间能否两两配对出 (n) 个奇数。显然是奇数个数等于偶数个数的情况,2分钟A掉了

    B. Plus and Multiply

    赛时想了个做法,感觉是对的,感觉很合理,但没有严格证明。25分钟的时候交了一发过了。

    官方题解也是这个思路,证明如下↓

    First judge specially if (b=1).

    Let's consider when (n) is in (S). The answer is when the smallest number (m) in (S) that (n mod b=m mod b) is less than (n). It's easy to see that a new case of (x mod b) can only appear when you use (×a) to generate a new element. So the smallest number (m) in (S) that (m mod b=k) must be a power of (a).

    Find all powers of (a) that is smaller than (n). If there is one (m=ak) that (n mod b=m mod b), the answer is yes. Otherwise it's no. Time complexity is (O(logn)).

    C. Strange Function

    就是想不出来怎么做。赛时打了个表,发现极其有规律,但无从下手。

    思考:

    For a given (x), when is (f(n)) equal to (x)?

    其实打表后我的关注点在出现的数字是有循环规律的,但我并没有在意每一个出现的数都很小。

    When (f(n)) is equal to (x),it means all the positive numbers that not greater than (x) are the divisors of (n).

    (英语菜也想写一波英文QwQ)不过大体就这样推式子吧

  • 相关阅读:
    币值转换
    第八周作业
    第七周作业
    第五周编程总结
    第四周编程总结
    第三周编程总结
    7-1 查找整数
    7-2 求最大值及其下标
    秋季学习总结
    对我影响最大的三个老师
  • 原文地址:https://www.cnblogs.com/wzsyyh/p/cf729_div2.html
Copyright © 2011-2022 走看看